[cairo] [PATCH pixman 04/11] pixman-filter: put error on center of odd-sized filters

Bill Spitzak spitzak at gmail.com
Wed Sep 10 19:01:58 PDT 2014


---
 pixman/pixman-filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 4ff02ec..15ea270 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -299,7 +299,7 @@ create_1d_filter (int             *width,
 	}
 
 	if (new_total != pixman_fixed_1)
-	    *(p - *width / 2) += (pixman_fixed_1 - new_total);
+	    *(p - (*width + 1) / 2) += (pixman_fixed_1 - new_total);
     }
 
     return params;
-- 
1.7.9.5



More information about the cairo mailing list