summaryrefslogtreecommitdiff
path: root/test/any2ppm.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-06-30 11:05:50 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2009-07-02 14:50:15 +0200
commit1e1f4fd0920cb2b0882137b4cc500dcbae42d2dc (patch)
tree57b1cc0808cd371f4f88f418c36728e6c1c2c338 /test/any2ppm.c
parent700a555d194a20c00df69b963cdc5b6153e162a4 (diff)
[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.
Diffstat (limited to 'test/any2ppm.c')
-rw-r--r--test/any2ppm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c
index 4800b545..31dd0eb4 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);