[cairo-commit] 15 commits - test/any2ppm.c test/clip-operator.pdf.argb32.ref.png test/filter-nearest-offset.pdf.argb32.ref.png test/filter-nearest-offset.pdf.ref.png test/filter-nearest-offset.pdf.rgb24.ref.png test/filter-nearest-transformed.pdf.argb32.ref.png test/filter-nearest-transformed.pdf.ref.png test/filter-nearest-transformed.pdf.rgb24.ref.png test/Makefile.am test/mask.pdf.argb32.ref.png test/mask.pdf.rgb24.ref.png test/mask-transformed-image.pdf.ref.png test/paint-source-alpha.pdf.argb32.ref.png test/paint-source-alpha.pdf.ref.png test/paint-with-alpha.pdf.ref.png test/pdf2png.c test/README test/rotate-image-surface-paint.pdf.argb32.ref.png test/rotate-image-surface-paint.pdf.ref.png test/rotate-image-surface-paint.pdf.rgb24.ref.png test/scale-source-surface-paint.pdf.argb32.ref.png test/scale-source-surface-paint.pdf.rgb24.ref.png test/smask.c test/smask-fill.c test/smask-image-mask.c test/smask-mask.c test/smask-paint.c test/smask-stroke.c test/smask-text.c test/surface-pattern.pdf.argb32.ref.png test/surface-pattern.pdf.ref.png test/surface-pattern.pdf.rgb24.ref.png test/text-pattern.pdf.argb32.ref.png test/text-pattern.pdf.rgb24.ref.png test/text-transform.pdf.ref.png test/trap-clip.pdf.argb32.ref.png

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Thu Jul 2 06:34:54 PDT 2009


 dev/null                                    |binary
 test/Makefile.am                            |   15 ++-------------
 test/README                                 |   11 +++++++++++
 test/any2ppm.c                              |    9 +++++----
 test/clip-operator.pdf.argb32.ref.png       |binary
 test/filter-nearest-offset.pdf.ref.png      |binary
 test/filter-nearest-transformed.pdf.ref.png |binary
 test/mask-transformed-image.pdf.ref.png     |binary
 test/mask.pdf.argb32.ref.png                |binary
 test/mask.pdf.rgb24.ref.png                 |binary
 test/pdf2png.c                              |    9 +++++----
 test/rotate-image-surface-paint.pdf.ref.png |binary
 test/smask-fill.c                           |    2 +-
 test/smask-image-mask.c                     |    2 +-
 test/smask-mask.c                           |    2 +-
 test/smask-paint.c                          |    2 +-
 test/smask-stroke.c                         |    2 +-
 test/smask-text.c                           |    2 +-
 test/smask.c                                |    2 +-
 test/surface-pattern.pdf.ref.png            |binary
 test/text-pattern.pdf.argb32.ref.png        |binary
 test/text-pattern.pdf.rgb24.ref.png         |binary
 test/text-transform.pdf.ref.png             |binary
 test/trap-clip.pdf.argb32.ref.png           |binary
 24 files changed, 30 insertions(+), 28 deletions(-)

New commits:
commit b2e2a2f31af33ff01d78c6c8786249a623017ffa
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 15:47:51 2009 +0200

    [test] Update argb32 pdf reference image for trap-clip

diff --git a/test/trap-clip.pdf.argb32.ref.png b/test/trap-clip.pdf.argb32.ref.png
index 1501016..e42fee8 100644
Binary files a/test/trap-clip.pdf.argb32.ref.png and b/test/trap-clip.pdf.argb32.ref.png differ
commit 910afc7a8e5c40f4fe682ec0b0f3836a07ea721d
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 15:40:24 2009 +0200

    [test] Mark all smask tests as XFAIL for pdf
    
    Those tests use linear gradients which are not correctly handled by
    poppler yet. See https://bugs.freedesktop.org/show_bug.cgi?id=10942

diff --git a/test/README b/test/README
index 7eca160..8a6545c 100644
--- a/test/README
+++ b/test/README
@@ -293,6 +293,17 @@ https://bugs.freedesktop.org/show_bug.cgi?id=14580
 --------------------------------------------------
 push-group
 
+spurious horizontal stripes in color gradients
+https://bugs.freedesktop.org/show_bug.cgi?id=10942
+--------------------------------------------------
+smask 
+smask-fill 
+smask-image-mask 
+smask-mask 
+smask-paint 
+smask-stroke 
+smask-text
+
 Ghostscript does not correctly render small miters
 http://bugs.ghostscript.com/show_bug.cgi?id=690098
 --------------------------------------------------
diff --git a/test/smask-fill.c b/test/smask-fill.c
index cb38610..289335c 100644
--- a/test/smask-fill.c
+++ b/test/smask-fill.c
@@ -67,7 +67,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_fill,
 	    "Test the support of \"soft\" masks with fills",
-	    "smask, fill", /* keywords */
+	    "XFAIL=pdf smask, fill", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
diff --git a/test/smask-image-mask.c b/test/smask-image-mask.c
index 1418721..b3bba60 100644
--- a/test/smask-image-mask.c
+++ b/test/smask-image-mask.c
@@ -77,7 +77,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_image_mask,
 	    "Test the support of \"soft\" masks with a secondary image mask",
-	    "smask, image", /* keywords */
+	    "XFAIL=pdf smask, image", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
diff --git a/test/smask-mask.c b/test/smask-mask.c
index 11cff82..d52754c 100644
--- a/test/smask-mask.c
+++ b/test/smask-mask.c
@@ -90,7 +90,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_mask,
 	    "Test the support of \"soft\" masks with a secondary mask",
-	    "smask, mask", /* keywords */
+	    "XFAIL=pdf smask, mask", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
diff --git a/test/smask-paint.c b/test/smask-paint.c
index ee781ca..e1cdaf0 100644
--- a/test/smask-paint.c
+++ b/test/smask-paint.c
@@ -75,7 +75,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_paint,
 	    "Test the support of \"soft\" masks with paints",
-	    "smask, paint", /* keywords */
+	    "XFAIL=pdf smask, paint", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
diff --git a/test/smask-stroke.c b/test/smask-stroke.c
index 2a8e7e8..c0fd90d 100644
--- a/test/smask-stroke.c
+++ b/test/smask-stroke.c
@@ -67,7 +67,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_stroke,
 	    "Test the support of \"soft\" masks with strokes",
-	    "smask, stroke", /* keywords */
+	    "XFAIL=pdf smask, stroke", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
diff --git a/test/smask-text.c b/test/smask-text.c
index c00aca4..d0e6069 100644
--- a/test/smask-text.c
+++ b/test/smask-text.c
@@ -77,7 +77,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask_text,
 	    "Test the support of \"soft\" masks with text",
-	    "smask, text", /* keywords */
+	    "XFAIL=pdf smask, text", /* keywords */
 	    NULL, /* keywords */
 	    120, 60,
 	    NULL, draw)
diff --git a/test/smask.c b/test/smask.c
index d28caca..1ff9f37 100644
--- a/test/smask.c
+++ b/test/smask.c
@@ -115,7 +115,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (smask,
 	    "Test the support of \"soft\" masks",
-	    "smask", /* keywords */
+	    "XFAIL=pdf smask", /* keywords */
 	    NULL, /* requirements */
 	    60, 60,
 	    NULL, draw)
commit 5becfc2bd59956090daa8afd68db2f139dcb8392
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 14:58:40 2009 +0200

    [test] Add pdf reference image for rotate-image-surface-paint
    
    Remove also argb32 and rgb24 pdf reference images.

diff --git a/test/Makefile.am b/test/Makefile.am
index d66e7ba..1c2bf2a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -761,8 +761,7 @@ REFERENCE_IMAGES = \
 	rel-path.ref.png \
 	rel-path.rgb24.ref.png \
 	rgb24-ignore-alpha.ref.png \
-	rotate-image-surface-paint.pdf.argb32.ref.png \
-	rotate-image-surface-paint.pdf.rgb24.ref.png \
+	rotate-image-surface-paint.pdf.ref.png \
 	rotate-image-surface-paint.ps2.ref.png \
 	rotate-image-surface-paint.ps3.ref.png \
 	rotate-image-surface-paint.quartz.ref.png \
diff --git a/test/rotate-image-surface-paint.pdf.argb32.ref.png b/test/rotate-image-surface-paint.pdf.argb32.ref.png
deleted file mode 100644
index 93fab52..0000000
Binary files a/test/rotate-image-surface-paint.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/rotate-image-surface-paint.pdf.ref.png b/test/rotate-image-surface-paint.pdf.ref.png
new file mode 100644
index 0000000..d5a9db6
Binary files /dev/null and b/test/rotate-image-surface-paint.pdf.ref.png differ
diff --git a/test/rotate-image-surface-paint.pdf.rgb24.ref.png b/test/rotate-image-surface-paint.pdf.rgb24.ref.png
deleted file mode 100644
index 93fab52..0000000
Binary files a/test/rotate-image-surface-paint.pdf.rgb24.ref.png and /dev/null differ
commit f81203cde864af1a1fea81a438e4f4effe928808
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 14:44:19 2009 +0200

    [test] Add pdf reference image for mask-transformed-image

diff --git a/test/Makefile.am b/test/Makefile.am
index 497a516..d66e7ba 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -597,6 +597,7 @@ REFERENCE_IMAGES = \
 	mask.svg12.rgb24.ref.png \
 	mask.test-fallback.argb32.ref.png \
 	mask.test-fallback.rgb24.ref.png \
+	mask-transformed-image.pdf.ref.png \
 	mask-transformed-image.ref.png \
 	mask-transformed-similar.pdf.ref.png \
 	mask-transformed-similar.ref.png \
diff --git a/test/mask-transformed-image.pdf.ref.png b/test/mask-transformed-image.pdf.ref.png
new file mode 100644
index 0000000..33ec279
Binary files /dev/null and b/test/mask-transformed-image.pdf.ref.png differ
commit 9d538ef337e9ca1600f842cd2164ff5e6629090a
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 14:42:32 2009 +0200

    [test] Update argb32 and rgb24 pdf reference image for mask

diff --git a/test/mask.pdf.argb32.ref.png b/test/mask.pdf.argb32.ref.png
index 8bd8f14..dfdfdc0 100644
Binary files a/test/mask.pdf.argb32.ref.png and b/test/mask.pdf.argb32.ref.png differ
diff --git a/test/mask.pdf.rgb24.ref.png b/test/mask.pdf.rgb24.ref.png
index a3d3845..95a49b7 100644
Binary files a/test/mask.pdf.rgb24.ref.png and b/test/mask.pdf.rgb24.ref.png differ
commit 97def877bb1c290735875061118bd795b9b83215
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 14:18:30 2009 +0200

    [test] Update pdf reference image for surface-pattern
    
    Remove also argb32 and rgb24 pdf reference images.

diff --git a/test/Makefile.am b/test/Makefile.am
index 78ebfd3..497a516 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -605,9 +605,7 @@ REFERENCE_IMAGES = \
 	mask.xlib-fallback.rgb24.ref.png \
 	mask.xlib.ref.png \
 	mask.xlib.rgb24.ref.png \
-	meta-surface-pattern.pdf.argb32.ref.png \
 	meta-surface-pattern.pdf.ref.png \
-	meta-surface-pattern.pdf.rgb24.ref.png \
 	meta-surface-pattern.ps2.argb32.ref.png \
 	meta-surface-pattern.ps2.rgb24.ref.png \
 	meta-surface-pattern.ps3.argb32.ref.png \
diff --git a/test/surface-pattern.pdf.argb32.ref.png b/test/surface-pattern.pdf.argb32.ref.png
deleted file mode 100644
index 70a4476..0000000
Binary files a/test/surface-pattern.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/surface-pattern.pdf.ref.png b/test/surface-pattern.pdf.ref.png
index ff9131c..c663aff 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.pdf.rgb24.ref.png b/test/surface-pattern.pdf.rgb24.ref.png
deleted file mode 100644
index 70a4476..0000000
Binary files a/test/surface-pattern.pdf.rgb24.ref.png and /dev/null differ
commit 8a6bdc63c1491dc77e8d9e192b9e44d9ff2e3c9b
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 13:33:07 2009 +0200

    [test] Update argb32 and rgb24 pdf reference image for text-pattern

diff --git a/test/text-pattern.pdf.argb32.ref.png b/test/text-pattern.pdf.argb32.ref.png
index dfaed39..46a1696 100644
Binary files a/test/text-pattern.pdf.argb32.ref.png and b/test/text-pattern.pdf.argb32.ref.png differ
diff --git a/test/text-pattern.pdf.rgb24.ref.png b/test/text-pattern.pdf.rgb24.ref.png
index 2933f34..fefa84b 100644
Binary files a/test/text-pattern.pdf.rgb24.ref.png and b/test/text-pattern.pdf.rgb24.ref.png differ
commit b46ba7aa33ba604628f1c94449019895b1d7ef82
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 13:25:39 2009 +0200

    [test] Update pdf reference image for text-transform

diff --git a/test/text-transform.pdf.ref.png b/test/text-transform.pdf.ref.png
index 46076bd..f36f76a 100644
Binary files a/test/text-transform.pdf.ref.png and b/test/text-transform.pdf.ref.png differ
commit 9bc7ab980d6e834dacaf4f48f199e8c95cfba94e
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 12:09:50 2009 +0200

    [test] Update pdf reference image for filter-nearest-transformed
    
    Remove also argb32 and rgb24 pdf reference images.

diff --git a/test/Makefile.am b/test/Makefile.am
index 4b489e3..78ebfd3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -398,9 +398,7 @@ REFERENCE_IMAGES = \
 	filter-nearest-offset.ref.png \
 	filter-nearest-offset.svg11.ref.png \
 	filter-nearest-offset.svg12.ref.png \
-	filter-nearest-transformed.pdf.argb32.ref.png \
 	filter-nearest-transformed.pdf.ref.png \
-	filter-nearest-transformed.pdf.rgb24.ref.png \
 	filter-nearest-transformed.ref.png \
 	filter-nearest-transformed.svg11.ref.png \
 	filter-nearest-transformed.svg12.ref.png \
diff --git a/test/filter-nearest-transformed.pdf.argb32.ref.png b/test/filter-nearest-transformed.pdf.argb32.ref.png
deleted file mode 100644
index 4016959..0000000
Binary files a/test/filter-nearest-transformed.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/filter-nearest-transformed.pdf.ref.png b/test/filter-nearest-transformed.pdf.ref.png
index 960ccc6..12d714e 100644
Binary files a/test/filter-nearest-transformed.pdf.ref.png and b/test/filter-nearest-transformed.pdf.ref.png differ
diff --git a/test/filter-nearest-transformed.pdf.rgb24.ref.png b/test/filter-nearest-transformed.pdf.rgb24.ref.png
deleted file mode 100644
index 4016959..0000000
Binary files a/test/filter-nearest-transformed.pdf.rgb24.ref.png and /dev/null differ
commit 27938f7e3ff357e5fe8a05e547cf83dbad7551ef
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 12:04:06 2009 +0200

    [test] Update pdf reference image for filter-nearest-offset
    
    Remove also argb32 and rgb24 pdf reference images.

diff --git a/test/Makefile.am b/test/Makefile.am
index a44d9c3..4b489e3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -392,9 +392,7 @@ REFERENCE_IMAGES = \
 	filter-bilinear-extents.ps2.ref.png \
 	filter-bilinear-extents.ps3.ref.png \
 	filter-bilinear-extents.ref.png \
-	filter-nearest-offset.pdf.argb32.ref.png \
 	filter-nearest-offset.pdf.ref.png \
-	filter-nearest-offset.pdf.rgb24.ref.png \
 	filter-nearest-offset.ps2.ref.png \
 	filter-nearest-offset.ps3.ref.png \
 	filter-nearest-offset.ref.png \
diff --git a/test/filter-nearest-offset.pdf.argb32.ref.png b/test/filter-nearest-offset.pdf.argb32.ref.png
deleted file mode 100644
index 3475cb6..0000000
Binary files a/test/filter-nearest-offset.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/filter-nearest-offset.pdf.ref.png b/test/filter-nearest-offset.pdf.ref.png
index 4dcfbed..e19eb4f 100644
Binary files a/test/filter-nearest-offset.pdf.ref.png and b/test/filter-nearest-offset.pdf.ref.png differ
diff --git a/test/filter-nearest-offset.pdf.rgb24.ref.png b/test/filter-nearest-offset.pdf.rgb24.ref.png
deleted file mode 100644
index 3475cb6..0000000
Binary files a/test/filter-nearest-offset.pdf.rgb24.ref.png and /dev/null differ
commit e6576e8912196607fdd3613c6924e26c2ce7a951
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 11:56:18 2009 +0200

    [test] Update argb32 pdf reference image for clip-operator

diff --git a/test/clip-operator.pdf.argb32.ref.png b/test/clip-operator.pdf.argb32.ref.png
index e2fdc8d..318873a 100644
Binary files a/test/clip-operator.pdf.argb32.ref.png and b/test/clip-operator.pdf.argb32.ref.png differ
commit 13d9374ec13c62233312beb0feb9a47531aec2e3
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon Jun 29 17:36:47 2009 +0200

    [test] Remove PDF reference images for scale-source-surface-paint
    
    It works with current poppler now

diff --git a/test/Makefile.am b/test/Makefile.am
index 9e51d43..a44d9c3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -779,8 +779,6 @@ REFERENCE_IMAGES = \
 	scale-offset-image.ref.png \
 	scale-offset-similar.ps.ref.png \
 	scale-offset-similar.ref.png \
-	scale-source-surface-paint.pdf.argb32.ref.png \
-	scale-source-surface-paint.pdf.rgb24.ref.png \
 	scale-source-surface-paint.ref.png \
 	scale-source-surface-paint.rgb24.ref.png \
 	scale-source-surface-paint.svg11.argb32.ref.png \
diff --git a/test/scale-source-surface-paint.pdf.argb32.ref.png b/test/scale-source-surface-paint.pdf.argb32.ref.png
deleted file mode 100644
index de274f9..0000000
Binary files a/test/scale-source-surface-paint.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/scale-source-surface-paint.pdf.rgb24.ref.png b/test/scale-source-surface-paint.pdf.rgb24.ref.png
deleted file mode 100644
index 3e873ab..0000000
Binary files a/test/scale-source-surface-paint.pdf.rgb24.ref.png and /dev/null differ
commit 3710c4184c2e87368dde5ccb25f3648b861b6059
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon Jun 29 17:32:54 2009 +0200

    [test] Remove PDF reference images for paint-with-alpha
    
    It works with current poppler now

diff --git a/test/Makefile.am b/test/Makefile.am
index 58078b6..9e51d43 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -707,7 +707,6 @@ REFERENCE_IMAGES = \
 	paint-source-alpha.ref.png \
 	paint-source-alpha.svg11.ref.png \
 	paint-source-alpha.svg12.ref.png \
-	paint-with-alpha.pdf.ref.png \
 	paint-with-alpha.ref.png \
 	paint-with-alpha.svg11.ref.png \
 	paint-with-alpha.svg12.ref.png \
diff --git a/test/paint-with-alpha.pdf.ref.png b/test/paint-with-alpha.pdf.ref.png
deleted file mode 100644
index 9da63ad..0000000
Binary files a/test/paint-with-alpha.pdf.ref.png and /dev/null differ
commit 8162acd81a898247f19054a136af95062e3b0e91
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon Jun 29 12:42:52 2009 +0200

    [test] Remove PDF reference images for paint-source-alpha
    
    It works with current poppler now

diff --git a/test/Makefile.am b/test/Makefile.am
index 63a24cc..58078b6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -704,8 +704,6 @@ REFERENCE_IMAGES = \
 	over-between-source.xlib.rgb24.ref.png \
 	paint.ref.png \
 	paint-repeat.ref.png \
-	paint-source-alpha.pdf.argb32.ref.png \
-	paint-source-alpha.pdf.ref.png \
 	paint-source-alpha.ref.png \
 	paint-source-alpha.svg11.ref.png \
 	paint-source-alpha.svg12.ref.png \
diff --git a/test/paint-source-alpha.pdf.argb32.ref.png b/test/paint-source-alpha.pdf.argb32.ref.png
deleted file mode 100644
index d1c23e8..0000000
Binary files a/test/paint-source-alpha.pdf.argb32.ref.png and /dev/null differ
diff --git a/test/paint-source-alpha.pdf.ref.png b/test/paint-source-alpha.pdf.ref.png
deleted file mode 100644
index befab10..0000000
Binary files a/test/paint-source-alpha.pdf.ref.png and /dev/null differ
commit 1e1f4fd0920cb2b0882137b4cc500dcbae42d2dc
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Tue Jun 30 11:05:50 2009 +0200

    [test] Use poppler_page_render with a transparent surface
    
    Instead of using an opaque surface filled in white, use a transparent
    surface and fill it in white by using CAIRO_OPERATOR_DEST_OVER after
    rendering.

diff --git a/test/any2ppm.c b/test/any2ppm.c
index 4800b54..31dd0eb 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -332,15 +332,16 @@ _poppler_render_page (const char *filename,
 
     poppler_page_get_size (page, &width, &height);
 
-    surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
     cr = cairo_create (surface);
 
-    cairo_set_source_rgb (cr, 1., 1., 1.);
-    cairo_paint (cr);
-
     poppler_page_render (page, cr);
     g_object_unref (page);
 
+    cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+    cairo_set_source_rgb (cr, 1., 1., 1.);
+    cairo_paint (cr);
+
     status = cairo_status (cr);
     cairo_destroy (cr);
 
diff --git a/test/pdf2png.c b/test/pdf2png.c
index fc4390b..f60170c 100644
--- a/test/pdf2png.c
+++ b/test/pdf2png.c
@@ -74,16 +74,17 @@ int main (int argc, char *argv[])
 
     poppler_page_get_size (page, &width, &height);
 
-    surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
+    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
     cr = cairo_create (surface);
     cairo_surface_destroy (surface);
 
-    cairo_set_source_rgb (cr, 1., 1., 1.);
-    cairo_paint (cr);
-
     poppler_page_render (page, cr);
     g_object_unref (page);
 
+    cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+    cairo_set_source_rgb (cr, 1., 1., 1.);
+    cairo_paint (cr);
+
     status = cairo_surface_write_to_png (cairo_get_target (cr),
 					 output_filename);
     cairo_destroy (cr);


More information about the cairo-commit mailing list