How can I create PyGTK pixmaps with one pixel value set to transparent? I know it has something to do with creating a pixmap of depth 1 and setting it as a mask, but all I find is that it either does nothing or totally erases my pixmap when drawn. At the moment, I make a pixmap with
r = self.get_allocation()
p1 = gtk.gdk.Pixmap(self.window,r.width,r.height)
p1_c = p1.cairo_create()
then draw black lines all over it using Cairo. What I'd like to be able to do is to have all of the area not covered by lines transparent (making white the transparent colour, say), so that when I draw it to the window with draw_drawable, it leaves everything 'underneath' intact.
The FAQs and mailing list postings regarding this issue are most unhelpful as they are so outdated. Someone must know here!