summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--src/cairo-gstate.c4
-rw-r--r--test/Makefile.am1
-rw-r--r--test/move-to-show-surface.c9
-rwxr-xr-xtest/testsvg4
5 files changed, 28 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 356e4b69..936627be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
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:
* src/cairo.c: (cairo_set_target_image), (cairo_text_extents),
(cairo_show_text), (cairo_text_path):
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index c8d8427e..e794fb4a 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 95f7fcfb..93d9c9df 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 48e3b16a..4dd41662 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 <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.
+ *
*/
diff --git a/test/testsvg b/test/testsvg
index 52044294..9b18df58 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