[cairo] Surprising cairo_win32_printing_surface Behavior

Brent Fulgham bfulgham at gmail.com
Wed Jan 6 22:53:56 PST 2010


I have been attempting to get printing of web plugins to work under a Cairo-backed version of WebKit that runs on Windows.  The basic problem is that regions of the screen drawn by various plugins seem to be partially clipped, even though the other elements on the page (text, graphics, etc.) are not overlapping.  Cairo is responsible for nearly all elements that appear on the page, but hands a windows device context and a rectangular region for the plugin to use for its drawing.

I have simplified the test case down to a single program, which draws a set of graphics (using some of the examples from the cairographics.org site), and finally draws a blue rectangle on a region of the screen that overlaps with some of the Cairo drawings.  I have placed a ZIP file of the example here: "http://files.me.com/bfulgham/aztjcp".

I built using Cairo 1.8.8 (and pixman 0.17.1), and would be happy to provide my binaries if anyone needs them.

I include two example images:  (1) a png showing what the drawing looks like on-screen, and (2) the output of printing to a PDF printer.

Can anyone familiar with the win32 printing surface help me figure out how best to approach this problem?

Thanks,

-Brent




More information about the cairo mailing list