[cairo] need help making background on custom cairo widget transparent

Michael L. Gualtieri mikeg at cs.pitt.edu
Fri Jul 14 15:51:34 PDT 2006


Hi all,

After many hours trying to get this working I broke down and decided to
join the mailing list here :-)

I am writing a GTK application where I plan on using some custom Cairo
Widgits.

Thus far I created two custom widgits based on the article by Davyd
Madeley inthe Gnome Journal found here:
http://www.gnomejournal.org/article/34/writing-a-widget-using-cairo-and-gtk28

My plans are to have one cairo widget be the background image of the
application (let's call it "background widget") and another widget that
rests on top of the "background widget" (let's call it "image widget").

The problem is that the "image widget" appears in an ugly grey box.  I
would like the background of the image widget to show what is under it
(namely the "background widget" or whatever else I decide to put it on),
leaving only the image inside the "image widget" visible.  I have tried
countless ways to make this happen but have had no luck.

I have been able to change the color of the widget, but when I use
the rgba channel, 100% alpha just shows up as a black background.  I have
also tried to set the GTK_NO_WINDOW flag for the "image widget", but this
makes it disappear completely.

Can anyone point me in the right direction to get things working?  Thanks
in advance!




More information about the cairo mailing list