Re: How can I draw a trasparent pixmap when drawable is a pixmap?



* Havoc Pennington <hp redhat com> [001119 20:48]:

rings <rings etang com> writes:
    I have a question about transparent pixmap.I have a big
    pixmap,now,I want to get this result.When I press my mouse
    button,I draw a small pixmap on the big pixmap.In other words,my
    drawable is a pixmap. But my difficult is that a small pixmap's
    size is 48x48 and it have white background color.I draw it on a
    big pixmap,then I will find its white background color hide big
    pixmap.How can I chang it transparent?  


Use a mask to draw the pixmap, so the background won't be drawn. I
think testgtk has examples in it.

How do you combine several transparent pixmaps into a single window
then? If you use gtk_widget_shape_combine_mask on each pixmap, then the
mask belonging to the last pixmap will "win" and everything but the last
pixmap will be masked out.

All the examples put a transparent pixmap into its own window.

/Alex





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]