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

Bill Spitzak <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <1410487950-55268-5-git-send-email-spitzak__37412.2799760245$1410488061$gmane$org@gmail.com>
---
 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 a9af72c..816d085 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -294,7 +294,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

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.