fix cairo's a1-image-sample test
authorBertram Felgenhauer <int-e@gmx.de>
Sat, 19 Jan 2008 12:29:56 +0000 (13:29 +0100)
committerBertram Felgenhauer <int-e@gmx.de>
Sat, 19 Jan 2008 14:38:16 +0000 (15:38 +0100)
Move the sampling point for image surfaces very slightly so that it's in
the upper left quadrant of the pixel.

pixman/pixman-compose.c

index c3f50e2..e240850 100644 (file)
@@ -3695,8 +3695,8 @@ static void fbFetchTransformed(bits_image_t * pict, int x, int y, int width, uin
     stride = pict->rowstride;
 
     /* reference point is the center of the pixel */
-    v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1 / 2;
-    v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2;
+    v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1 / 2 - 1;
+    v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2 - 1;
     v.vector[2] = pixman_fixed_1;
 
     /* when using convolution filters one might get here without a transform */