GdkPixmap gdk_pixmap_new transparency



Hello, I'm new to the mailing list, but the reason I signed up was because
I've been trying to find out
how to recreate the 'transparency' in a GdkPixmap like when it was first
created.

For example, this code is purely pseudo code but should hopefully make it
clear what I am trying to do:

GdkPixmap *target = gdk_pixmap_new(NULL,500,400,24);
GdkPixmap *bg = gdk_pixmap_new_from_file("Somebackground.bmp");

GdkPixmap *film_layer = gdk_pixmap_new(NULL,500,400,24);

gdk_draw_drawable(target,bg);
gdk_draw_drawable(target, film_layer);

If `bg` was a pixmap containing an image that was 500 by 400 pixels and it
was drawn onto `target`, `target` would
hold the image. Now, when I draw the `film_layer` onto the target, since it
has had no drawing done to it at all,
it is like nothing was drawn on target at all.

This is excellent as it is what I wanted, but if I was to draw on
`film_layer`, I can't figure out how I would go about
erasing any drawing operations, to make it as if the pixmap was transparent
again.

I hope I explained that well. Thanks for reading.



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