Revert "test/pdf2png: Don't use DEST_OVER as poppler starts using subpixel text."

This reverts commit 506b2ebe71.

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.
This commit is contained in:
Chris Wilson 2010-06-11 12:54:15 +01:00
parent c761e0c5bb
commit 7f227ec8d3
2 changed files with 10 additions and 9 deletions

View file

@ -357,15 +357,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);

View file

@ -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);