[gimp] app: minor formatting fixes in gimpdrawable-bucket-fill.c



commit c1cba759f879b08d2c6363c77c8754e3e4cfe86e
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 27 00:29:41 2019 +0200

    app: minor formatting fixes in gimpdrawable-bucket-fill.c

 app/core/gimpdrawable-bucket-fill.c | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/app/core/gimpdrawable-bucket-fill.c b/app/core/gimpdrawable-bucket-fill.c
index c5c3ccd367..c41fa54a2e 100644
--- a/app/core/gimpdrawable-bucket-fill.c
+++ b/app/core/gimpdrawable-bucket-fill.c
@@ -69,7 +69,9 @@ gimp_drawable_bucket_fill (GimpDrawable         *drawable,
   g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
 
   image = gimp_item_get_image (GIMP_ITEM (drawable));
+
   gimp_set_busy (image->gimp);
+
   buffer = gimp_drawable_get_bucket_fill_buffer (drawable, options,
                                                  fill_transparent, fill_criterion,
                                                  threshold, sample_merged,
@@ -87,13 +89,14 @@ gimp_drawable_bucket_fill (GimpDrawable         *drawable,
                                   gimp_context_get_paint_mode (GIMP_CONTEXT (options)),
                                   GIMP_LAYER_COLOR_SPACE_AUTO,
                                   GIMP_LAYER_COLOR_SPACE_AUTO,
-                                  gimp_layer_mode_get_paint_composite_mode (
-                                                                            gimp_context_get_paint_mode 
(GIMP_CONTEXT (options))),
+                                  gimp_layer_mode_get_paint_composite_mode
+                                  (gimp_context_get_paint_mode (GIMP_CONTEXT (options))),
                                   NULL, (gint) mask_x, mask_y);
       g_object_unref (buffer);
 
       gimp_drawable_update (drawable, mask_x, mask_y, width, height);
     }
+
   gimp_unset_busy (image->gimp);
 }
 
@@ -176,6 +179,7 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable         *drawable,
     }
 
   gimp_set_busy (image->gimp);
+
   if (sample_merged)
     pickable = GIMP_PICKABLE (image);
   else
@@ -200,6 +204,7 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable         *drawable,
                                      GIMP_CHANNEL_OP_ADD, 0, 0);
       g_object_unref (*mask_buffer);
     }
+
   if (mask_buffer)
     *mask_buffer = new_mask;
 
@@ -229,9 +234,11 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable         *drawable,
 
                                       &x, &y, &width, &height))
         {
+          /*  The fill region and the selection are disjoint; bail.  */
+
           if (! mask_buffer)
             g_object_unref (new_mask);
-          /*  The fill region and the selection are disjoint; bail.  */
+
           gimp_unset_busy (image->gimp);
 
           return NULL;
@@ -258,7 +265,7 @@ gimp_drawable_get_bucket_fill_buffer (GimpDrawable         *drawable,
       mask_offset_x = x;
       mask_offset_y = y;
 
-     /*  translate mask bounds to drawable coords  */
+      /*  translate mask bounds to drawable coords  */
       x -= off_x;
       y -= off_y;
     }
@@ -435,7 +442,7 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable     *drawable,
       mask_offset_x = x;
       mask_offset_y = y;
 
-     /*  translate mask bounds to drawable coords  */
+      /*  translate mask bounds to drawable coords  */
       x -= off_x;
       y -= off_y;
     }
@@ -454,13 +461,15 @@ gimp_drawable_get_line_art_fill_buffer (GimpDrawable     *drawable,
                            -mask_offset_x, -mask_offset_y, 1.0);
 
   if (gimp_fill_options_get_feather (options, &feather_radius))
-    /* Feathering for the line art algorithm is not applied during
-     * mask creation because we just want to apply it on the borders
-     * of the mask at the end (since the mask can evolve, we don't
-     * want to actually touch it, but only the intermediate results).
-     */
-    gimp_gegl_apply_feather (buffer, NULL, NULL, buffer, NULL,
-                             feather_radius, feather_radius);
+    {
+      /* Feathering for the line art algorithm is not applied during
+       * mask creation because we just want to apply it on the borders
+       * of the mask at the end (since the mask can evolve, we don't
+       * want to actually touch it, but only the intermediate results).
+       */
+      gimp_gegl_apply_feather (buffer, NULL, NULL, buffer, NULL,
+                               feather_radius, feather_radius);
+    }
 
   if (mask_x)
     *mask_x = x;


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