Re: How to set a transparent style?



>> From: <hunchback netcabo pt>
>>
>> Hi, 
>>
>> i'm doing something that involves GtkDrawingArea, in which i paint
>> some GdkPixmaps, and some of this GdkPixmaps have some
>> transparent areas, the problem is when i paint them, the transparent 
>> areas are painted in white! How do i do so that the transparent areas aren't
> 
>> painted?
>
>The problem is, there is no such thing as a GdkPixmap with a transparent
>area. Transparent pixels are handled by setting the clip mask in the
>graphics context. If you created the pixmap from an xpm, the same function
>which created the pixmap also created the mask you need to use.

this is not *quite* true. you can use gdk_window_shape_combine_mask()
to create genuinely transparent areas without setting the clip mask
for every drawing operation. however, using
gdk_window_shape_combine_mask() is not trivial to do in every case.

--p



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