[Poppler-bugs] [Bug 20045] setPaperColor in CairoOutputDev

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 23 03:16:19 PST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=20045

Adrian Johnson <ajohnson at redneon.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #4 from Adrian Johnson <ajohnson at redneon.com> 2012-02-23 03:16:19 PST ---
The poppler_page_render_to_pixbux api has been removed. The correct way to set
the paper color is to first render to a transparent surface then paint the
surface over the paper color. eg

    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                                          IMAGE_DPI*width/72.0,
                                          IMAGE_DPI*height/72.0);
    cr = cairo_create (surface);
    cairo_scale (cr, IMAGE_DPI/72.0, IMAGE_DPI/72.0);
    poppler_page_render (page, cr);
    cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
    cairo_set_source_rgb (cr, 1, 1, 1);  // Set paper color
    cairo_paint (cr);

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list