[gegl] operations: annotate angle properties with "direction" ui-meta



commit 7b0578073a0f20334b5a8a8fe57b649d9f302454
Author: Ell <ell_se yahoo com>
Date:   Tue Jul 24 01:34:19 2018 -0400

    operations: annotate angle properties with "direction" ui-meta
    
    Annotate all directional angle properties with a "direction" UI-
    meta, specifying whether the angle is measured clockwise ("cw") or
    counter-clockwise ("ccw").  This allows directionality-dependent
    UI, such as GIMP's dial widget, to use the correct direction.

 operations/common-gpl3+/bump-map.c          | 1 +
 operations/common-gpl3+/emboss.c            | 1 +
 operations/common-gpl3+/mosaic.c            | 1 +
 operations/common-gpl3+/polar-coordinates.c | 1 +
 operations/common-gpl3+/ripple.c            | 1 +
 operations/common-gpl3+/spiral.c            | 1 +
 operations/common-gpl3+/whirl-pinch.c       | 1 +
 operations/common/little-planet.c           | 3 +++
 operations/common/mirrors.c                 | 2 ++
 operations/common/motion-blur-linear.c      | 1 +
 operations/common/newsprint.c               | 4 ++++
 operations/common/panorama-projection.c     | 3 +++
 operations/common/vignette.c                | 1 +
 operations/transform/rotate.c               | 1 +
 operations/workshop/linear-sinusoid.c       | 2 ++
 15 files changed, 24 insertions(+)
---
diff --git a/operations/common-gpl3+/bump-map.c b/operations/common-gpl3+/bump-map.c
index f96e2f7f8..31b9f8261 100644
--- a/operations/common-gpl3+/bump-map.c
+++ b/operations/common-gpl3+/bump-map.c
@@ -51,6 +51,7 @@ property_boolean (tiled, _("Tiled"), FALSE)
 property_double  (azimuth, _("Azimuth"), 135.0)
   value_range (0.0, 360.0)
   ui_meta     ("unit", "degree")
+  ui_meta     ("direction", "ccw")
 
 property_double  (elevation, _("Elevation"), 45.0)
   value_range (0.5, 90.0)
diff --git a/operations/common-gpl3+/emboss.c b/operations/common-gpl3+/emboss.c
index ee184ad3c..1130d60f9 100644
--- a/operations/common-gpl3+/emboss.c
+++ b/operations/common-gpl3+/emboss.c
@@ -35,6 +35,7 @@ property_double (azimuth, _("Azimuth"), 30.0)
     description (_("Light angle (degrees)"))
     value_range (0, 360)
     ui_meta ("unit", "degree")
+    ui_meta ("direction", "ccw")
 
 property_double (elevation, _("Elevation"), 45.0)
     description (_("Elevation angle (degrees)"))
diff --git a/operations/common-gpl3+/mosaic.c b/operations/common-gpl3+/mosaic.c
index 538d5fb6e..d5cfb3fa9 100644
--- a/operations/common-gpl3+/mosaic.c
+++ b/operations/common-gpl3+/mosaic.c
@@ -81,6 +81,7 @@ property_double (light_dir, _("Light direction"), 135.0)
     description (("Direction of light-source (in degrees)"))
     value_range (0.0, 360.0)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "ccw")
 
 property_boolean (antialiasing, _("Antialiasing"), TRUE)
     description  (_("Enables smoother tile output"))
diff --git a/operations/common-gpl3+/polar-coordinates.c b/operations/common-gpl3+/polar-coordinates.c
index 22895c56b..ed20f33f8 100644
--- a/operations/common-gpl3+/polar-coordinates.c
+++ b/operations/common-gpl3+/polar-coordinates.c
@@ -38,6 +38,7 @@ property_double (depth, _("Circle depth in percent"), 100.0)
 property_double (angle, _("Offset angle"), 0.0)
   value_range   (0.0, 360.0)
   ui_meta       ("unit", "degree")
+  ui_meta       ("direction", "ccw")
 
 property_boolean (bw, _("Map backwards"), FALSE)
   description    (_("Start from the right instead of the left"))
diff --git a/operations/common-gpl3+/ripple.c b/operations/common-gpl3+/ripple.c
index 9bc31b957..e4b8b63e0 100644
--- a/operations/common-gpl3+/ripple.c
+++ b/operations/common-gpl3+/ripple.c
@@ -45,6 +45,7 @@ property_double (phi, _("Phase shift"), 0.0)
 property_double (angle, _("Angle"), 0.0)
     value_range (-180, 180)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "ccw")
 
 property_enum  (sampler_type, _("Resampling method"),
     GeglSamplerType, gegl_sampler_type, GEGL_SAMPLER_CUBIC)
diff --git a/operations/common-gpl3+/spiral.c b/operations/common-gpl3+/spiral.c
index dfce19957..dd0add378 100644
--- a/operations/common-gpl3+/spiral.c
+++ b/operations/common-gpl3+/spiral.c
@@ -65,6 +65,7 @@ property_double (rotation, _("Rotation"), 0.0)
   description (_("Spiral rotation"))
   value_range (0.0, 360.0)
   ui_meta     ("unit", "degree")
+  ui_meta     ("direction", "ccw")
 
 enum_start (gegl_spiral_direction)
   enum_value (GEGL_SPIRAL_DIRECTION_CLOCKWISE,        "cw",  N_("Clockwise"))
diff --git a/operations/common-gpl3+/whirl-pinch.c b/operations/common-gpl3+/whirl-pinch.c
index 4796d348d..bb10ef300 100644
--- a/operations/common-gpl3+/whirl-pinch.c
+++ b/operations/common-gpl3+/whirl-pinch.c
@@ -37,6 +37,7 @@ property_double (whirl, _("Whirl"), 90.0)
     description (_("Whirl angle (degrees)"))
     ui_range    (-720, 720)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "ccw")
 
 property_double (pinch, _("Pinch"), 0.0)
     description (_("Pinch amount"))
diff --git a/operations/common/little-planet.c b/operations/common/little-planet.c
index b1a1fa6fc..117898490 100644
--- a/operations/common/little-planet.c
+++ b/operations/common/little-planet.c
@@ -25,16 +25,19 @@ property_double (pan, _("Pan"), 0.0)
   description   (_("Horizontal camera panning"))
   value_range   (-360.0, 360.0)
   ui_meta       ("unit", "degree")
+  ui_meta       ("direction", "cw")
 
 property_double (tilt, _("Tilt"), 90.0)
   description   (_("Vertical camera panning"))
   value_range   (-180.0, 180.0)
   ui_range      (-180.0, 180.0)
   ui_meta       ("unit", "degree")
+  ui_meta       ("direction", "cw")
 
 property_double (spin, _("Spin"), 0.0)
   description   (_("Spin angle around camera axis"))
   value_range   (-360.0, 360.0)
+  ui_meta       ("direction", "cw")
 
 property_double (zoom, _("Zoom"), 100.0)
   description   (("Zoom level"))
diff --git a/operations/common/mirrors.c b/operations/common/mirrors.c
index 155d11dfe..85c26dce6 100644
--- a/operations/common/mirrors.c
+++ b/operations/common/mirrors.c
@@ -31,11 +31,13 @@ property_double (m_angle, _("Mirror rotation"), 0.0)
     description (_("Rotation applied to the mirrors"))
     value_range (0.0, 180.0)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "cw")
 
 property_double (r_angle, _("Result rotation"), 0.0)
     description (_("Rotation applied to the result"))
     value_range (0.0, 360.0)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "cw")
 
 property_int    (n_segs, _("Mirrors"), 6)
     description (_("Number of mirrors to use"))
diff --git a/operations/common/motion-blur-linear.c b/operations/common/motion-blur-linear.c
index 9c5434ec2..5c1047be0 100644
--- a/operations/common/motion-blur-linear.c
+++ b/operations/common/motion-blur-linear.c
@@ -34,6 +34,7 @@ property_double (angle, _("Angle"), 0.0)
     description (_("Angle of blur in degrees"))
     value_range (-180, 180)
     ui_meta     ("unit", "degree")
+    ui_meta     ("direction", "cw")
 
 #else
 
diff --git a/operations/common/newsprint.c b/operations/common/newsprint.c
index c604d3981..86366fb58 100644
--- a/operations/common/newsprint.c
+++ b/operations/common/newsprint.c
@@ -63,6 +63,7 @@ property_double (angleboost, _("Angle Boost"), 0.0)
 property_double (twist, _("Black and green angle"), 75.0)
                  value_range (-180.0, 180.0)
                  ui_meta ("unit", "degree")
+                 ui_meta ("direction", "ccw")
                  description (_("angle offset for patterns"))
                  ui_meta ("label", "[color-model {white-on-black,"
                                    "              black-on-white} : bw-label,"
@@ -75,6 +76,7 @@ property_double (twist, _("Black and green angle"), 75.0)
 property_double (twist2, _("Red and cyan angle"), 15.0)
                  value_range (-180.0, 180.0)
                  ui_meta ("unit", "degree")
+                 ui_meta ("direction", "ccw")
                  ui_meta ("visible", "color-model {rgb, cmyk}")
                  ui_meta ("label", "[color-model {rgb}  : rgb-label,"
                                    " color-model {cmyk} : cmyk-label]")
@@ -84,6 +86,7 @@ property_double (twist2, _("Red and cyan angle"), 15.0)
 property_double (twist3, _("Blue and magenta angle"), 45.0)
                  value_range (-180.0, 180.0)
                  ui_meta ("unit", "degree")
+                 ui_meta ("direction", "ccw")
                  ui_meta ("visible", "color-model {rgb, cmyk}")
                  ui_meta ("label", "[color-model {rgb}  : rgb-label,"
                                    " color-model {cmyk} : cmyk-label]")
@@ -93,6 +96,7 @@ property_double (twist3, _("Blue and magenta angle"), 45.0)
 property_double (twist4, _("Yellow angle"), 0.0)
                  value_range (-180.0, 180.0)
                  ui_meta ("unit", "degree")
+                 ui_meta ("direction", "ccw")
                  ui_meta ("visible", "color-model {cmyk}")
 
 #else
diff --git a/operations/common/panorama-projection.c b/operations/common/panorama-projection.c
index ab4439c68..d74b0992b 100644
--- a/operations/common/panorama-projection.c
+++ b/operations/common/panorama-projection.c
@@ -25,16 +25,19 @@ property_double (pan, _("Pan"), 0.0)
   description   (_("Horizontal camera panning"))
   value_range   (-360.0, 360.0)
   ui_meta       ("unit", "degree")
+  ui_meta       ("direction", "cw")
 
 property_double (tilt, _("Tilt"), 0.0)
   description   (_("Vertical camera panning"))
   value_range   (-180.0, 180.0)
   ui_range      (-180.0, 180.0)
   ui_meta       ("unit", "degree")
+  ui_meta       ("direction", "cw")
 
 property_double (spin, _("Spin"), 0.0)
   description   (_("Spin angle around camera axis"))
   value_range   (-360.0, 360.0)
+  ui_meta       ("direction", "cw")
 
 property_double (zoom, _("Zoom"), 100.0)
   description   (("Zoom level"))
diff --git a/operations/common/vignette.c b/operations/common/vignette.c
index 2f49ed3bd..85cd23a67 100644
--- a/operations/common/vignette.c
+++ b/operations/common/vignette.c
@@ -71,6 +71,7 @@ property_double (y, _("Center Y"), 0.5)
 property_double (rotation, _("Rotation"), 0.0)
     value_range (0.0, 360.0)
     ui_meta     ("unit", "degree") /* XXX: change to radians */
+    ui_meta     ("direction", "cw")
 
 #else
 
diff --git a/operations/transform/rotate.c b/operations/transform/rotate.c
index 51cc28feb..9af3beea7 100644
--- a/operations/transform/rotate.c
+++ b/operations/transform/rotate.c
@@ -27,6 +27,7 @@ property_double (degrees, _("Degrees"), 0.0)
     value_range (-720.0, 720.0)
     ui_range (-180.0, 180.0)
     ui_meta ("unit", "degree")
+    ui_meta ("direction", "ccw")
 
 #else
 
diff --git a/operations/workshop/linear-sinusoid.c b/operations/workshop/linear-sinusoid.c
index 69c2b931f..f4c30dbc3 100644
--- a/operations/workshop/linear-sinusoid.c
+++ b/operations/workshop/linear-sinusoid.c
@@ -67,6 +67,7 @@ property_double (angle, _("Angle"), 90.0)
   description(_("Axis separation angle"))
   value_range (0.0, 360.0)
   ui_meta     ("unit", "degree")
+  ui_meta     ("direction", "ccw")
 
 property_double (offset, _("Offset"), 0.0)
   description(_("Value offset"))
@@ -96,6 +97,7 @@ property_double (rotation, _("Rotation"), 0.0)
   description(_("Pattern rotation angle"))
   value_range (0.0, 360.0)
   ui_meta     ("unit", "degree")
+  ui_meta     ("direction", "ccw")
 
 property_int (supersampling, _("Supersampling"), 1)
   description(_("Number of samples along each axis per pixel"))


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