From 3b56173831f5a11aad2d695da0a076ad753f13a3 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 21 May 2008 18:50:13 +0000 Subject: [PATCH] add missing include and missing call to gimp_drawable_mask_intersect(). 2008-05-21 Michael Natterer * app/core/gimpdrawable-process.c (gimp_drawable_process): add missing include and missing call to gimp_drawable_mask_intersect(). svn path=/trunk/; revision=25736 --- ChangeLog | 9 +++++++++ app/core/gimpdrawable-process.c | 26 ++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 224ffa09cf..c179b48a22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-05-21 Michael Natterer + + * app/core/gimpdrawable-process.c (gimp_drawable_process): add + missing include and missing call to gimp_drawable_mask_intersect(). + +2008-05-21 Michael Natterer + + * app/gegl/gimpdesaturateconfig.c: use a stock_id that exists. + 2008-05-21 Martin Nordholts Made the Foreground Select Tool work again. diff --git a/app/core/gimpdrawable-process.c b/app/core/gimpdrawable-process.c index 4f18686a92..69eac3586a 100644 --- a/app/core/gimpdrawable-process.c +++ b/app/core/gimpdrawable-process.c @@ -26,9 +26,11 @@ #include "base/pixel-region.h" #include "gimpdrawable.h" +#include "gimpdrawable-process.h" #include "gimpdrawable-shadow.h" #include "gimpprogress.h" + void gimp_drawable_process (GimpDrawable *drawable, GimpProgress *progress, @@ -36,22 +38,26 @@ gimp_drawable_process (GimpDrawable *drawable, PixelProcessorFunc func, gpointer data) { - PixelRegion srcPR, destPR; - gint x, y, width, height; + gint x, y, width, height; g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress)); - pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable), - x, y, width, height, FALSE); - pixel_region_init (&destPR, gimp_drawable_get_shadow_tiles (drawable), - x, y, width, height, TRUE); + if (gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height)) + { + PixelRegion srcPR, destPR; - pixel_regions_process_parallel (func, data, 2, &srcPR, &destPR); + pixel_region_init (&srcPR, gimp_drawable_get_tiles (drawable), + x, y, width, height, FALSE); + pixel_region_init (&destPR, gimp_drawable_get_shadow_tiles (drawable), + x, y, width, height, TRUE); - gimp_drawable_merge_shadow_tiles (drawable, TRUE, undo_desc); - gimp_drawable_free_shadow_tiles (drawable); + pixel_regions_process_parallel (func, data, 2, &srcPR, &destPR); - gimp_drawable_update (drawable, x, y, width, height); + gimp_drawable_merge_shadow_tiles (drawable, TRUE, undo_desc); + gimp_drawable_free_shadow_tiles (drawable); + + gimp_drawable_update (drawable, x, y, width, height); + } }