diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-11 12:54:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-06-11 12:54:15 +0100 |
commit | 7f227ec8d3f981dbbf2ca1914bf7fd29d9cdfd05 (patch) | |
tree | 37c47b0f2242c7cf0858d997fc0b5f0dfa4f6b35 /test/pdf2png.c | |
parent | c761e0c5bb55e8869521ad5b4a2447ea9abcb4d1 (diff) |
Revert "test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text."
This reverts commit 506b2ebe714d61a64972b607a42a55e48d1c722a.
We have conflicting requirements here. In order to support extended
blend modes correctly we need to use DEST_OVER, at the expense of
supporting subpixel text. More thought required.
Diffstat (limited to 'test/pdf2png.c')
-rw-r--r-- | test/pdf2png.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/pdf2png.c b/test/pdf2png.c index 279ccfe69..f60170cc6 100644 --- a/test/pdf2png.c +++ b/test/pdf2png.c @@ -74,17 +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); - /* fill the background with white */ - 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); |