[cairo-commit] src/cairo-matrix.c test/rotate-image-surface-paint.ref.png test/surface-pattern.pdf.ref.png test/surface-pattern.ref.png test/surface-pattern.svg.ref.png

Chris Wilson ickle at kemper.freedesktop.org
Wed Nov 5 04:18:57 PST 2008

 src/cairo-matrix.c                      |    8 ++++----
 test/rotate-image-surface-paint.ref.png |binary
 test/surface-pattern.pdf.ref.png        |binary
 test/surface-pattern.ref.png            |binary
 test/surface-pattern.svg.ref.png        |binary
 5 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 29621bd3995c5269fd6f73ab501383433bd29768
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Nov 5 12:16:47 2008 +0000

    [matrix] Remove stray offset from previous commit.
    I moved the pixel centre to xc,yc but forgot to remove it during
    compensation - as caught by the test suite.
    Refresh a couple of reference images that depend upon exact pixel-centre
    rounding conditions.

diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index 0c7f305..0558983 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -929,11 +929,11 @@ _cairo_matrix_to_pixman_matrix (const cairo_matrix_t	*matrix,
 	    y = pixman_fixed_to_double (vector.vector[1]);
 	    cairo_matrix_transform_point (&inv, &x, &y);
-	    /* Ideally, the vector should now be (xc, yc) [offset for pixel
-	     * centre]. We can now compensate for the resulting error.
+	    /* Ideally, the vector should now be (xc, yc).
+	     * We can now compensate for the resulting error.
-	    x -= xc; x += .5;
-	    y -= yc; y += .5;
+	    x -= xc;
+	    y -= yc;
 	    cairo_matrix_transform_distance (matrix, &x, &y);
 	    dx = _cairo_fixed_16_16_from_double (x);
 	    dy = _cairo_fixed_16_16_from_double (y);
diff --git a/test/rotate-image-surface-paint.ref.png b/test/rotate-image-surface-paint.ref.png
index bd20481..5c98d7d 100644
Binary files a/test/rotate-image-surface-paint.ref.png and b/test/rotate-image-surface-paint.ref.png differ
diff --git a/test/surface-pattern.pdf.ref.png b/test/surface-pattern.pdf.ref.png
index c37e2a4..ff9131c 100644
Binary files a/test/surface-pattern.pdf.ref.png and b/test/surface-pattern.pdf.ref.png differ
diff --git a/test/surface-pattern.ref.png b/test/surface-pattern.ref.png
index 9cdf6a5..db60da6 100644
Binary files a/test/surface-pattern.ref.png and b/test/surface-pattern.ref.png differ
diff --git a/test/surface-pattern.svg.ref.png b/test/surface-pattern.svg.ref.png
index 2078fc0..cdbcf47 100644
Binary files a/test/surface-pattern.svg.ref.png and b/test/surface-pattern.svg.ref.png differ

More information about the cairo-commit mailing list