[gegl] long-shadow: disable fixed-rate fading style



commit c6d03fc4d82dd27927787d61365e6900e7363135
Author: Ell <ell_se yahoo com>
Date:   Fri Sep 21 01:41:47 2018 -0400

    long-shadow: disable fixed-rate fading style
    
    The fixed-rate fading shadow style's interaction with the midpoint
    parameter is problematic, having a discontinuity at midpoint=1.  It
    may also be problematic w.r.t. some future directions for the op.
    Let's disable it for now, especially since the fixed-length fading
    style is probably the more useful one.
    
    Note that the code for the fixed-rate style is all still there,
    it's simply made inaccessible.

 operations/common/long-shadow.c | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)
---
diff --git a/operations/common/long-shadow.c b/operations/common/long-shadow.c
index f443317e4..6998dcbb8 100644
--- a/operations/common/long-shadow.c
+++ b/operations/common/long-shadow.c
@@ -19,14 +19,20 @@
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
+#define WITH_FADING_FIXED_RATE
+
 #ifdef GEGL_PROPERTIES
 
 enum_start (gegl_long_shadow_style)
-  enum_value (GEGL_LONG_SHADOW_STYLE_FINITE,              "finite",              N_("Finite"))
-  enum_value (GEGL_LONG_SHADOW_STYLE_INFINITE,            "infinite",            N_("Infinite"))
-  enum_value (GEGL_LONG_SHADOW_STYLE_FADING,              "fading",              N_("Fading"))
-  enum_value (GEGL_LONG_SHADOW_STYLE_FADING_FIXED_LENGTH, "fading-fixed-length", N_("Fading (fixed length)"))
-  enum_value (GEGL_LONG_SHADOW_STYLE_FADING_FIXED_RATE,   "fading-fixed-rate",   N_("Fading (fixed rate)"))
+  enum_value      (GEGL_LONG_SHADOW_STYLE_FINITE,              "finite",              N_("Finite"))
+  enum_value      (GEGL_LONG_SHADOW_STYLE_INFINITE,            "infinite",            N_("Infinite"))
+  enum_value      (GEGL_LONG_SHADOW_STYLE_FADING,              "fading",              N_("Fading"))
+  enum_value      (GEGL_LONG_SHADOW_STYLE_FADING_FIXED_LENGTH, "fading-fixed-length", N_("Fading (fixed 
length)"))
+#ifdef WITH_FADING_FIXED_RATE
+  enum_value      (GEGL_LONG_SHADOW_STYLE_FADING_FIXED_RATE,   "fading-fixed-rate",   N_("Fading (fixed 
rate)"))
+#else
+  enum_value_skip (GEGL_LONG_SHADOW_STYLE_FADING_FIXED_RATE)
+#endif
 enum_end (GeglLongShadowStyle)
 
 enum_start (gegl_long_shadow_composition)
@@ -50,9 +56,12 @@ property_double (length, _("Length"), 100.0)
   description (_("Shadow length"))
   value_range (0.0, G_MAXDOUBLE)
   ui_range    (0.0, 1000.0)
-  ui_meta     ("visible", "style {finite,              "
-                          "       fading-fixed-length, "
-                          "       fading-fixed-rate}")
+  ui_meta     ("visible", "style {finite,            "
+                          "       fading-fixed-length"
+#ifdef WITH_FADING_FIXED_RATE
+                          "       , fading-fixed-rate"
+#endif
+                          "      }")
 
 property_double (midpoint, _("Midpoint"), 100.0)
   description (_("Shadow fade midpoint"))
@@ -63,7 +72,11 @@ property_double (midpoint, _("Midpoint"), 100.0)
 property_double (midpoint_rel, _("Midpoint (relative)"), 0.5)
   description (_("Shadow fade midpoint, as a factor of the shadow length"))
   value_range (0.0, 1.0)
-  ui_meta     ("visible", "style {fading-fixed-length, fading-fixed-rate}")
+  ui_meta     ("visible", "style {fading-fixed-length"
+#ifdef WITH_FADING_FIXED_RATE
+                          "       , fading-fixed-rate"
+#endif
+                          "      }")
   ui_meta     ("label", "alt-label")
   ui_meta     ("alt-label", _("Midpoint"))
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]