diff --git a/ChangeLog b/ChangeLog index 356e4b697..936627be6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2005-04-02 Carl Worth + + * src/cairo-gstate.c: (_cairo_gstate_show_surface): Use the + current point to offset just the destination, not the source and + destination. With this fix, cairo_show_surface should work with + the current point at places other than the origin. + + * test/Makefile.am: Move move-to-show-surface off the expected + failure list. + + * test/move-to-show-surface.c: Add comment indicating that bug is + resolved. + + * test/testsvg: Don't use diff to compare images, just imagediff. + 2005-04-02 Carl Worth * src/cairo.h: diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index c8d8427e7..e794fb4ab 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -2111,7 +2111,7 @@ _cairo_gstate_show_surface (cairo_gstate_t *gstate, &pattern.base, &clip_pattern.base, gstate->surface, - extents.x, extents.y, + 0, 0, 0, 0, extents.x, extents.y, extents.width, extents.height); @@ -2132,7 +2132,7 @@ _cairo_gstate_show_surface (cairo_gstate_t *gstate, &pattern.base, NULL, gstate->surface, - extents.x, extents.y, + 0, 0, 0, 0, extents.x, extents.y, extents.width, extents.height); diff --git a/test/Makefile.am b/test/Makefile.am index 95f7fcfb8..93d9c9df8 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -41,7 +41,6 @@ romedalen.png # regression bugs that should not be listed here. Instead they should # be fixed before the code is committed. XFAIL_TESTS = \ -move-to-show-surface \ pixman-rotate \ text-rotate diff --git a/test/move-to-show-surface.c b/test/move-to-show-surface.c index 48e3b16a3..4dd416625 100644 --- a/test/move-to-show-surface.c +++ b/test/move-to-show-surface.c @@ -32,6 +32,15 @@ * bit of poking around suggests this isn't a regression, (at least * not since the last pixman snapshot). * + * 2005-04-02 Carl Worth + * + * Status: RESOLVED + * + * Inside cairo_show_surface the current point was being used as + * both source and destination offsets. After fixing that to use 0,0 + * as the source offset and the current point as the destination + * offset, the bug seems to be gone. + * */ diff --git a/test/testsvg b/test/testsvg index 520442948..9b18df586 100755 --- a/test/testsvg +++ b/test/testsvg @@ -27,11 +27,11 @@ for svg in $@; do # if xsvg $svg -p $outpng ; then if svg2png $svg $outpng ; then if [ -e $refpng ]; then - if diff $refpng $outpng > /dev/null; then + if $IMAGEDIFF $refpng $outpng > $diffpng; then echo "Rendering of $svg matches." >&2 + rm -f $diffpng else echo "ERROR: Rendering of $svg differs from reference image." >&2 - $IMAGEDIFF $refpng $outpng > $diffpng echo $refpng $outpng $diffpng >> $IMAGELIST err=$(($err+1)) fi