Created attachment 18060 [details]
Image illustrating bug in the win32 printing backend.
An application of mine (giv) draws an image and vector graphics on top of the image. Lately I have added printing support, which works fine under Linux through the pdf backend. But the same cairo commands causes the wrong output through the win32 printing backend. The series of commands are roughly:
* Draw an image through
* Draw vector graphics through
The resulting rendering is attached. On windows the image was generated through the CutePDF backend, but the result was verified to be the same through other win32 printing backends.
I can confirm this in pycairo/pygtk on winxp:
gtk (2, 12, 10)
pygtk (2, 12, 1)
pycairo (1, 4, 12)
I can also confirm that bug occurs when using a virtual pdf printer (pdfcreator), as well as when using a real printer.
A black rectangle is painted behind vector graphics, the rectangle is the same as the path's bounding box. For example:
produces a black square, 100x100, instead of a line.
I've noticed some other clues:
* You need not draw over an image to trigger the bug. Attempting to draw on blankness will trigger it too.
* Notably, the show_text function is not effected. i.e. context.show_text("blah"); context.fill() works as expected.
* Using panocairo, however does trigger the bug. Presumably pangocairo uses normal paths instead of show_text or show_glyphs.
I am unable to reproduce this. If you can provide a simple test case it would assist in further investigating this problem.
Nor can I since upgrading to:
gtk (2, 14, 2)
pygtk (2, 12, 1)
I no longer get this bug.
print "cairo info",cairo.version_info
cairo info (1, 4, 12)
Looks like GTK's win32 printing was seriously overhauled in 2.13:
So that's probably where the bug was. I had a feeling I was reporting against the wrong project after hitting Commit. Sorry.
I just updated to the last version of cairo for win32 and the problem indeed has been solved! Thanks a lot. Closing the bug.