[gimp/blend-tool-fun: 7/8] app: Rename properties of gimp:blend to match GimpBlendOptions



commit c471b7f563d9c68907d695df496a2b20735cdf69
Author: Michael Henning <drawoc darkrefraction com>
Date:   Sun Jun 22 21:48:34 2014 -0400

    app: Rename properties of gimp:blend to match GimpBlendOptions

 app/operations/gimpoperationblend.c |   73 ++++++++++++++++++-----------------
 app/operations/gimpoperationblend.h |    8 ++--
 2 files changed, 41 insertions(+), 40 deletions(-)
---
diff --git a/app/operations/gimpoperationblend.c b/app/operations/gimpoperationblend.c
index 69d4305..e4c54a6 100644
--- a/app/operations/gimpoperationblend.c
+++ b/app/operations/gimpoperationblend.c
@@ -49,12 +49,12 @@ enum
   PROP_END_X,
   PROP_END_Y,
   PROP_GRADIENT_TYPE,
-  PROP_REPEAT_MODE,
+  PROP_GRADIENT_REPEAT,
   PROP_OFFSET,
-  PROP_REVERSE,
+  PROP_GRADIENT_REVERSE,
   PROP_SUPERSAMPLE,
-  PROP_MAX_DEPTH,
-  PROP_THRESHOLD,
+  PROP_SUPERSAMPLE_DEPTH,
+  PROP_SUPERSAMPLE_THRESHOLD,
   PROP_DITHER
 };
 
@@ -199,7 +199,7 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (object_class, PROP_START_X,
-                                   g_param_spec_double ("start_x",
+                                   g_param_spec_double ("start-x",
                                                         "Start X",
                                                         "X coordinate of the first point",
                                                         -G_MAXDOUBLE, G_MAXDOUBLE, 0,
@@ -207,7 +207,7 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (object_class, PROP_START_Y,
-                                   g_param_spec_double ("start_y",
+                                   g_param_spec_double ("start-y",
                                                         "Start Y",
                                                         "Y coordinate of the first point",
                                                         -G_MAXDOUBLE, G_MAXDOUBLE, 0,
@@ -215,7 +215,7 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (object_class, PROP_END_X,
-                                   g_param_spec_double ("end_x",
+                                   g_param_spec_double ("end-x",
                                                         "End X",
                                                         "X coordinate of the second point",
                                                         -G_MAXDOUBLE, G_MAXDOUBLE, 200,
@@ -223,7 +223,7 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (object_class, PROP_END_Y,
-                                   g_param_spec_double ("end_y",
+                                   g_param_spec_double ("end-y",
                                                         "End Y",
                                                         "Y coordinate of the second point",
                                                         -G_MAXDOUBLE, G_MAXDOUBLE, 200,
@@ -231,7 +231,7 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_CONSTRUCT));
 
   g_object_class_install_property (object_class, PROP_GRADIENT_TYPE,
-                                   g_param_spec_enum ("gradient_type",
+                                   g_param_spec_enum ("gradient-type",
                                                       "Gradient Type",
                                                       "The type of gradient to render",
                                                       GIMP_TYPE_GRADIENT_TYPE,
@@ -239,8 +239,8 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                       G_PARAM_READWRITE |
                                                       G_PARAM_CONSTRUCT));
 
-  g_object_class_install_property (object_class, PROP_REPEAT_MODE,
-                                   g_param_spec_enum ("repeat",
+  g_object_class_install_property (object_class, PROP_GRADIENT_REPEAT,
+                                   g_param_spec_enum ("gradient-repeat",
                                                       "Repeat mode",
                                                       "Repeat mode",
                                                       GIMP_TYPE_REPEAT_MODE,
@@ -257,8 +257,8 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT));
 
-  g_object_class_install_property (object_class, PROP_REVERSE,
-                                   g_param_spec_boolean ("reverse",
+  g_object_class_install_property (object_class, PROP_GRADIENT_REVERSE,
+                                   g_param_spec_boolean ("gradient-reverse",
                                                          "Reverse",
                                                          "Reverse the gradient",
                                                          FALSE,
@@ -273,16 +273,16 @@ gimp_operation_blend_class_init (GimpOperationBlendClass *klass)
                                                          G_PARAM_READWRITE |
                                                          G_PARAM_CONSTRUCT));
 
-  g_object_class_install_property (object_class, PROP_MAX_DEPTH,
-                                   g_param_spec_int ("max_depth",
+  g_object_class_install_property (object_class, PROP_SUPERSAMPLE_DEPTH,
+                                   g_param_spec_int ("supersample-depth",
                                                      "Max depth",
                                                      "Maximum recursion levels for supersampling",
                                                      1, 9, 3,
                                                      G_PARAM_READWRITE |
                                                      G_PARAM_CONSTRUCT));
 
-  g_object_class_install_property (object_class, PROP_THRESHOLD,
-                                   g_param_spec_double ("threshold",
+  g_object_class_install_property (object_class, PROP_SUPERSAMPLE_THRESHOLD,
+                                   g_param_spec_double ("supersample-threshold",
                                                         "Threshold",
                                                         "Supersampling threshold",
                                                         0, 4, 0.20,
@@ -346,28 +346,28 @@ gimp_operation_blend_get_property (GObject    *object,
       g_value_set_enum (value, self->gradient_type);
       break;
 
-    case PROP_REPEAT_MODE:
-      g_value_set_enum (value, self->repeat);
+    case PROP_GRADIENT_REPEAT:
+      g_value_set_enum (value, self->gradient_repeat);
       break;
 
     case PROP_OFFSET:
       g_value_set_double (value, self->offset);
       break;
 
-    case PROP_REVERSE:
-      g_value_set_boolean (value, self->reverse);
+    case PROP_GRADIENT_REVERSE:
+      g_value_set_boolean (value, self->gradient_reverse);
       break;
 
     case PROP_SUPERSAMPLE:
       g_value_set_boolean (value, self->supersample);
       break;
 
-    case PROP_MAX_DEPTH:
-      g_value_set_int (value, self->max_depth);
+    case PROP_SUPERSAMPLE_DEPTH:
+      g_value_set_int (value, self->supersample_depth);
       break;
 
-    case PROP_THRESHOLD:
-      g_value_set_double (value, self->threshold);
+    case PROP_SUPERSAMPLE_THRESHOLD:
+      g_value_set_double (value, self->supersample_threshold);
       break;
 
     case PROP_DITHER:
@@ -430,28 +430,28 @@ gimp_operation_blend_set_property (GObject      *object,
       self->gradient_type = g_value_get_enum (value);
       break;
 
-    case PROP_REPEAT_MODE:
-      self->repeat = g_value_get_enum (value);
+    case PROP_GRADIENT_REPEAT:
+      self->gradient_repeat = g_value_get_enum (value);
       break;
 
     case PROP_OFFSET:
       self->offset = g_value_get_double (value);
       break;
 
-    case PROP_REVERSE:
-      self->reverse = g_value_get_boolean (value);
+    case PROP_GRADIENT_REVERSE:
+      self->gradient_reverse = g_value_get_boolean (value);
       break;
 
     case PROP_SUPERSAMPLE:
       self->supersample = g_value_get_boolean (value);
       break;
 
-    case PROP_MAX_DEPTH:
-      self->max_depth = g_value_get_int (value);
+    case PROP_SUPERSAMPLE_DEPTH:
+      self->supersample_depth = g_value_get_int (value);
       break;
 
-    case PROP_THRESHOLD:
-      self->threshold = g_value_get_double (value);
+    case PROP_SUPERSAMPLE_THRESHOLD:
+      self->supersample_threshold = g_value_get_double (value);
       break;
 
     case PROP_DITHER:
@@ -955,7 +955,7 @@ gimp_operation_blend_process (GeglOperation       *operation,
   RenderBlendData rbd = { 0, };
 
   rbd.gradient = NULL;
-  rbd.reverse  = self->reverse;
+  rbd.reverse  = self->gradient_reverse;
 
   if (self->gradient)
     rbd.gradient = g_object_ref (self->gradient);
@@ -1030,7 +1030,7 @@ gimp_operation_blend_process (GeglOperation       *operation,
   rbd.sx            = self->start_x;
   rbd.sy            = self->start_y;
   rbd.gradient_type = self->gradient_type;
-  rbd.repeat        = self->repeat;
+  rbd.repeat        = self->gradient_repeat;
 
   /* Render the gradient! */
 
@@ -1048,7 +1048,8 @@ gimp_operation_blend_process (GeglOperation       *operation,
       gimp_adaptive_supersample_area (result->x, result->y,
                                       result->x + result->width  - 1,
                                       result->y + result->height - 1,
-                                      self->max_depth, self->threshold,
+                                      self->supersample_depth,
+                                      self->supersample_threshold,
                                       gradient_render_pixel, &rbd,
                                       gradient_put_pixel, &ppd,
                                       NULL,
diff --git a/app/operations/gimpoperationblend.h b/app/operations/gimpoperationblend.h
index 1af972e..f587ec8 100644
--- a/app/operations/gimpoperationblend.h
+++ b/app/operations/gimpoperationblend.h
@@ -43,13 +43,13 @@ struct _GimpOperationBlend
   GimpGradient        *gradient;
   gdouble              start_x, start_y, end_x, end_y;
   GimpGradientType     gradient_type;
-  GimpRepeatMode       repeat;
+  GimpRepeatMode       gradient_repeat;
   gdouble              offset;
-  gboolean             reverse;
+  gboolean             gradient_reverse;
 
   gboolean             supersample;
-  gint                 max_depth;
-  gdouble              threshold;
+  gint                 supersample_depth;
+  gdouble              supersample_threshold;
 
   gboolean             dither;
 };


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