After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 424622 - Win32: cairo_stroke fills instead of strokes in a draw_page handler
Win32: cairo_stroke fills instead of strokes in a draw_page handler
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.10.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-30 20:35 UTC by Andreas Köhler
Modified: 2008-04-01 21:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use gtkprint api (815 bytes, text/plain)
2007-03-30 20:36 UTC, Andreas Köhler
Details
use win api (2.54 KB, text/plain)
2007-03-30 20:37 UTC, Andreas Köhler
Details
gtkprint pdf (4.15 KB, application/pdf)
2007-03-30 20:38 UTC, Andreas Köhler
Details
win api pdf (2.44 KB, application/pdf)
2007-03-30 20:39 UTC, Andreas Köhler
Details
PDF created with GtkPrint from trunk (2.32 KB, application/pdf)
2008-04-01 21:15 UTC, Cody Russell
Details

Description Andreas Köhler 2007-03-30 20:35:43 UTC
Try to print a black rectangle using cairo_stroke, i.e. leaving it filled white.

* with attachment 1 [details], the rectangle is filled black and not white; only the gtkprint api, cairo_rectangle and cairo_stroke are used.
* with attachment 2 [details] (compile with -lcomdlg32), the rectangle is fine.  PrintDlgEx, StartDoc, StartPage, EndPage, EndDoc, cairo_rectangle and cairo_stroke are used.

See also the attached PDFs created with PDFCreator.  As the direct implementation seems to work, I suspect that one cannot blame cairo for this bug solely.

Related is bug 347125.
Comment 1 Andreas Köhler 2007-03-30 20:36:45 UTC
Created attachment 85589 [details]
use gtkprint api
Comment 2 Andreas Köhler 2007-03-30 20:37:13 UTC
Created attachment 85590 [details]
use win api
Comment 3 Andreas Köhler 2007-03-30 20:38:44 UTC
Created attachment 85591 [details]
gtkprint pdf
Comment 4 Andreas Köhler 2007-03-30 20:39:03 UTC
Created attachment 85592 [details]
win api pdf
Comment 5 Bastiaan 2008-02-22 15:00:26 UTC
Actually, all strokes are replaced by a black box with the dimensions of the bounding box of the strokes. So it is not a question of filling with the wrong color. See also bug 518052.
Comment 6 Cody Russell 2008-04-01 21:15:54 UTC
Created attachment 108439 [details]
PDF created with GtkPrint from trunk

GTK trunk now supports cairo_win32_printing_surface and this bug appears fixed.  Here is a sample output created with your test program and using PDFCreator on Windows.

The rectangle seems thicker than the output with your Win API test, but if that's an issue I think it's a separate one.  I'm going to go ahead and close this as FIXED.