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 665507 - Pixmap via cairo DIB breaks gdk_gc_set_stipple() use
Pixmap via cairo DIB breaks gdk_gc_set_stipple() use
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.24.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-12-03 17:30 UTC by Hans Breuer
Modified: 2014-03-16 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Dai master alpha simulation working with gtk-2-22 (62.90 KB, image/png)
2012-06-24 12:56 UTC, Hans Breuer
  Details
0001-Bug-665507-Pixmap-via-cairo-DIB-breaks-gdk_gc_set_st.patch (3.47 KB, patch)
2012-10-16 21:03 UTC, Hans Breuer
none Details | Review

Description Hans Breuer 2011-12-03 17:30:46 UTC
Dia master has code to render partially transparent colors. There is an emulation with stipple drawing for the Gdk renderer. That does not draw anything anymore with the restricted pixmaps of the recent commit 
http://git.gnome.org/browse/gtk+/commit/?id=2ae574ab

There is probably a better way than just reverting the above commit, but ATM it fixes the issue for me.
Comment 1 Dieter Verfaillie 2011-12-27 10:52:30 UTC
Is your cairo built with the patches from
https://bugs.freedesktop.org/show_bug.cgi?id=42739 and
https://bugs.freedesktop.org/show_bug.cgi?id=42821 ?

If it helps, http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/cairo_1.10.2-2_win32.zip was built with these included.
Comment 2 Hans Breuer 2012-06-24 12:56:49 UTC
Created attachment 217115 [details]
Dai master alpha simulation working with gtk-2-22

I've finally got around patching cairo 1.10 from yesterday but this bug is still there. Your version does not work for me as a drop-in replacement due to all it's (IMHO superfluous) dependencies: fontconfig, freetype ...
Current cairo 1.12 is including the above mentioned patches, but does not work on win32, yet. [1]
To give you an impression of what is missing I've attached a screenshot of Dia master showing included render-test.dia. The three (red, green, blue) colored 
circles are simply not drawn with gtk-2-24. Also there are complaints on the console, e.g.:

(dia.exe:1196): Gdk-WARNING **: gdkdrawable-win32.c:698: SelectObject failed: Der Vorgang wurde erfolgreich beendet.

(dia.exe:1196): Gdk-WARNING **: gdkdrawable-win32.c:711: MaskBlt failed: Der Vorgang wurde erfolgreich beendet.

IIRC the console message are new and may not be related. With gtk-2-22 Dia works as intended.

[1] http://lists.cairographics.org/archives/cairo/2012-June/023272.html
Comment 3 Hans Breuer 2012-10-16 21:03:32 UTC
Created attachment 226589 [details] [review]
0001-Bug-665507-Pixmap-via-cairo-DIB-breaks-gdk_gc_set_st.patch 

Proposed patch attached (reasoning below)

Only one bitmap can be selected into a device context. Using the
DIB created by cairo consumes the one opportunity, so every further
SelectObject into the same DC in GDK code will fail.