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.

Move move-to-show-surface off the expected failure list.
Add comment indicating that bug is resolved.
Don't use diff to compare images, just imagediff.
This commit is contained in:
Carl Worth 2005-04-02 06:00:32 +00:00
parent 9e405876e8
commit 5778c77382
5 changed files with 28 additions and 5 deletions

View file

@ -1,3 +1,18 @@
2005-04-02 Carl Worth <cworth@cworth.org>
* 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 <cworth@cworth.org>
* src/cairo.h:

View file

@ -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);

View file

@ -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

View file

@ -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 <cworth@cworth.org>
*
* 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.
*
*/

View file

@ -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