[librsvg/gnome-3-2] filter: The blur filter was not rendered correctly when scaled to certain sizes.



commit e5774f3bd03e5e0bf13a0ca89d7cb7d66fd5f217
Author: Isak <isaklindbeck hotmail com>
Date:   Tue Jan 11 00:51:33 2011 +0100

    filter: The blur filter was not rendered correctly when scaled to certain sizes.
    
    Two for-loops was missing their initial expression in the box_blur function.

 rsvg-filter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 5d071e7..eb87e5b 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -1355,12 +1355,12 @@ box_blur (GdkPixbuf * in, GdkPixbuf * output, guchar * intermediate, gint kw,
                     if (y - kh / 2 >= 0 && y - kh / 2 < boundarys.y1)
                         output_pixels[4 * x + (y - kh / 2) * rowstride + ch] = sum / kh;
                 }
-                for (; y < boundarys.y1; y++) {
+                for (y = boundarys.y0 + kh; y < boundarys.y1; y++) {
                     sum -= intermediate[y % kh];
                     sum += (intermediate[y % kh] = in_pixels[4 * x + y * rowstride + ch]);
                     output_pixels[4 * x + (y - kh / 2) * rowstride + ch] = sum / kh;
                 }
-                for (; y < boundarys.y1 + kh; y++) {
+                for (y = boundarys.y1; y < boundarys.y1 + kh; y++) {
                     sum -= intermediate[y % kh];
 
                     if (y - kh / 2 >= 0 && y - kh / 2 < boundarys.y1)



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