? test/rotate-surface-pattern-ref.png ? test/testsvg-diff ? test/testsvg-output Index: pixman/src/fbcompose.c =================================================================== RCS file: /cvs/cairo/cairo/pixman/src/fbcompose.c,v retrieving revision 1.3 diff -u -r1.3 fbcompose.c --- pixman/src/fbcompose.c 28 Aug 2005 02:32:57 -0000 1.3 +++ pixman/src/fbcompose.c 9 Sep 2005 12:58:18 -0000 @@ -2724,8 +2724,9 @@ xFixed_32_32 l; xFixed_48_16 dx, dy, a, b, off; - v.vector[0] = IntToxFixed(x); - v.vector[1] = IntToxFixed(y); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x) + xFixed1/2; + v.vector[1] = IntToxFixed(y) + xFixed1/2; v.vector[2] = xFixed1; if (pict->transform) { if (!PictureTransformPoint3d (pict->transform, &v)) @@ -2791,8 +2792,9 @@ if (pict->transform) { PictVector v; - v.vector[0] = IntToxFixed(x); - v.vector[1] = IntToxFixed(y); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x) + xFixed1/2; + v.vector[1] = IntToxFixed(y) + xFixed1/2; v.vector[2] = xFixed1; if (!PictureTransformPoint3d (pict->transform, &v)) return; @@ -2913,8 +2915,9 @@ x += xoff; y += yoff; - v.vector[0] = IntToxFixed(x); - v.vector[1] = IntToxFixed(y); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x) + xFixed1/2; + v.vector[1] = IntToxFixed(y) + xFixed1/2; v.vector[2] = xFixed1; /* when using convolution filters one might get here without a transform */ @@ -3020,6 +3023,12 @@ } } } else if (pict->filter == PIXMAN_FILTER_BILINEAR || pict->filter == PIXMAN_FILTER_GOOD || pict->filter == PIXMAN_FILTER_BEST) { + /* adjust vector for maximum contribution at 0.5, 0.5 of each texel. */ + v.vector[0] -= v.vector[2]/2; + v.vector[1] -= v.vector[2]/2; + unit.vector[0] -= unit.vector[2]/2; + unit.vector[1] -= unit.vector[2]/2; + if (pict->repeat == RepeatNormal) { if (PIXREGION_NUM_RECTS(pict->pCompositeClip) == 1) { box = pict->pCompositeClip->extents;