diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-11 12:04:39 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-11 12:07:21 +0100 |
commit | 506b2ebe714d61a64972b607a42a55e48d1c722a (patch) | |
tree | 222364f0d7d1f94bba80fdfde224e7dc2701b795 /test/any2ppm.c | |
parent | edb73b6dcf1adce40d6c10c492e3f78556e22b85 (diff) | |
download | cairo-506b2ebe714d61a64972b607a42a55e48d1c722a.tar.gz |
test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text.
Using DEST_OVER in this form to paint the background white fails in the
presence of subpixel geometry (particular text), so remove the hack and
simply paint the background white prior to passing the surface to
poppler. KISS.
Diffstat (limited to 'test/any2ppm.c')
-rw-r--r-- | test/any2ppm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c index 55b4c7ec7..d6bc77960 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -357,16 +357,15 @@ _poppler_render_page (const char *filename, poppler_page_get_size (page, &width, &height); - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); cr = cairo_create (surface); - 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); + poppler_page_render (page, cr); + g_object_unref (page); + status = cairo_status (cr); cairo_destroy (cr); |