fix the preview for the zoom blur mode.

* plug-ins/common/mblur.c: fix the preview for the zoom blur mode.
This commit is contained in:
David Odin 2004-09-15 21:08:58 +00:00
parent 5f1373436c
commit a971903384
2 changed files with 192 additions and 183 deletions

View File

@ -1,3 +1,7 @@
2004-09-15 DindinX <david@dindinx.org>
* plug-ins/common/mblur.c: fix the preview for the zoom blur mode.
2004-09-15 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreviewarea.c

View File

@ -658,6 +658,8 @@ mblur_zoom (GimpDrawable *drawable,
gint progress, max_progress;
gint x, y, i, xx, yy, n, c;
gfloat f;
gint drawable_x1, drawable_y1;
gint drawable_x2, drawable_y2;
/* initialize */
@ -666,6 +668,9 @@ mblur_zoom (GimpDrawable *drawable,
center_x = mbvals.center_x;
center_y = mbvals.center_y;
gimp_drawable_mask_bounds (drawable->drawable_id,
&drawable_x1, &drawable_y1,
&drawable_x2, &drawable_y2);
gimp_pixel_rgn_init (&dest_rgn, drawable,
x1, y1, width, height, (preview == NULL), TRUE);
@ -700,8 +705,8 @@ mblur_zoom (GimpDrawable *drawable,
xx = center_x + (x - center_x) * (1.0 - f * i);
yy = center_y + (y - center_y) * (1.0 - f * i);
if ((yy < y1) || (yy >= y1 + height) ||
(xx < x1) || (xx >= x1 + width))
if ((yy < drawable_y1) || (yy >= drawable_y2) ||
(xx < drawable_x1) || (xx >= drawable_x2))
break;
gimp_pixel_fetcher_get_pixel (pft, xx, yy, pixel);