[gimp] app: fix GimpBrush transform parameter names and coding style



commit ac9b487795989c7fe5f279657cdb2651aec7a766
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 4 18:57:48 2011 +0200

    app: fix GimpBrush transform parameter names and coding style

 app/core/gimpbrush.c |   34 ++++++++++++++++++++++++++--------
 app/core/gimpbrush.h |   24 ++++++++++++------------
 2 files changed, 38 insertions(+), 20 deletions(-)
---
diff --git a/app/core/gimpbrush.c b/app/core/gimpbrush.c
index e99ff26..75a58c3 100644
--- a/app/core/gimpbrush.c
+++ b/app/core/gimpbrush.c
@@ -469,7 +469,9 @@ gimp_brush_transform_size (GimpBrush     *brush,
   g_return_if_fail (width != NULL);
   g_return_if_fail (height != NULL);
 
-  if ((scale == 1.0) && ( aspect_ratio == 0.0) && ((angle == 0.0) || (angle == 0.5) || (angle == 1.0)))
+  if (scale        == 1.0 &&
+      aspect_ratio == 0.0 &&
+      ((angle == 0.0) || (angle == 0.5) || (angle == 1.0)))
     {
       *width  = brush->mask->width;
       *height = brush->mask->height;
@@ -477,7 +479,9 @@ gimp_brush_transform_size (GimpBrush     *brush,
       return;
     }
 
-  GIMP_BRUSH_GET_CLASS (brush)->transform_size (brush, scale, aspect_ratio, angle, width, height);
+  GIMP_BRUSH_GET_CLASS (brush)->transform_size (brush,
+                                                scale, aspect_ratio, angle,
+                                                width, height);
 }
 
 TempBuf *
@@ -490,10 +494,17 @@ gimp_brush_transform_mask (GimpBrush *brush,
   g_return_val_if_fail (GIMP_IS_BRUSH (brush), NULL);
   g_return_val_if_fail (scale > 0.0, NULL);
 
-  if ((scale == 1.0) && (aspect_ratio == 0.0) && (angle == 0.0) && (hardness == 1.0))
-    return temp_buf_copy (brush->mask, NULL);
+  if (scale        == 1.0 &&
+      aspect_ratio == 0.0 &&
+      angle        == 0.0 &&
+      hardness     == 1.0)
+    {
+      return temp_buf_copy (brush->mask, NULL);
+    }
 
-  return GIMP_BRUSH_GET_CLASS (brush)->transform_mask (brush, scale, aspect_ratio, angle, hardness);
+  return GIMP_BRUSH_GET_CLASS (brush)->transform_mask (brush,
+                                                       scale, aspect_ratio,
+                                                       angle, hardness);
 }
 
 TempBuf *
@@ -507,10 +518,17 @@ gimp_brush_transform_pixmap (GimpBrush *brush,
   g_return_val_if_fail (brush->pixmap != NULL, NULL);
   g_return_val_if_fail (scale > 0.0, NULL);
 
-  if ((scale == 1.0) && (aspect_ratio == 0.0) && (angle == 0.0) && (hardness == 1.0))
-    return temp_buf_copy (brush->pixmap, NULL);
+  if (scale        == 1.0 &&
+      aspect_ratio == 0.0 &&
+      angle        == 0.0 &&
+      hardness     == 1.0)
+    {
+      return temp_buf_copy (brush->pixmap, NULL);
+    }
 
-  return GIMP_BRUSH_GET_CLASS (brush)->transform_pixmap (brush, scale, aspect_ratio, angle, hardness);
+  return GIMP_BRUSH_GET_CLASS (brush)->transform_pixmap (brush,
+                                                         scale, aspect_ratio,
+                                                         angle, hardness);
 }
 
 gdouble
diff --git a/app/core/gimpbrush.h b/app/core/gimpbrush.h
index ad20d78..ebd69da 100644
--- a/app/core/gimpbrush.h
+++ b/app/core/gimpbrush.h
@@ -57,19 +57,19 @@ struct _GimpBrushClass
                                     const GimpCoords *last_coords,
                                     const GimpCoords *current_coords);
   void        (* transform_size)   (GimpBrush        *brush,
-                                    gdouble           scale_x,
-                                    gdouble           scale_y,
+                                    gdouble           scale,
+                                    gdouble           aspect_ratio,
                                     gdouble           angle,
                                     gint             *width,
                                     gint             *height);
   TempBuf   * (* transform_mask)   (GimpBrush        *brush,
-                                    gdouble           scale_x,
-                                    gdouble           scale_y,
+                                    gdouble           scale,
+                                    gdouble           aspect_ratio,
                                     gdouble           angle,
                                     gdouble           hardness);
   TempBuf   * (* transform_pixmap) (GimpBrush        *brush,
-                                    gdouble           scale_x,
-                                    gdouble           scale_y,
+                                    gdouble           scale,
+                                    gdouble           aspect_ratio,
                                     gdouble           angle,
                                     gdouble           hardness);
 
@@ -93,19 +93,19 @@ gboolean    gimp_brush_want_null_motion (GimpBrush        *brush,
 
 /* Gets width and height of a transformed mask of the brush, for provided parameters. */
 void        gimp_brush_transform_size   (GimpBrush        *brush,
-                                         gdouble           scale_x,
-                                         gdouble           scale_y,
+                                         gdouble           scale,
+                                         gdouble           aspect_ratio,
                                          gdouble           angle,
                                          gint             *width,
                                          gint             *height);
 TempBuf   * gimp_brush_transform_mask   (GimpBrush        *brush,
-                                         gdouble           scale_x,
-                                         gdouble           scale_y,
+                                         gdouble           scale,
+                                         gdouble           aspect_ratio,
                                          gdouble           angle,
                                          gdouble           hardness);
 TempBuf   * gimp_brush_transform_pixmap (GimpBrush        *brush,
-                                         gdouble           scale_x,
-                                         gdouble           scale_y,
+                                         gdouble           scale,
+                                         gdouble           aspect_ratio,
                                          gdouble           angle,
                                          gdouble           hardness);
 



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