GdkDrawable / GdkPixbuf / Transparence


 Due to the characteristics of the Gambas GTK+ component I'm writting,
( for those interested), I have to perform
conversions between GdkDrawable and GdkPixbuf (well, I really have
to render a pixbuf in a drawable and extract a pixbuf from drawable)
The drawable i use is a GdkPixmap.

 I have problems with transparences, in this part of the code, I've
loaded a PNG icon in a pixbuf (called img) and I try to render it in
a pixmap (pic->image)

pic->image=gdk_pixmap_new (NULL,myw,myh,depth);
gdk_draw_pixbuf(pic->image,NULL,img,0,0,0,0,-1,-1,GDK_RGB_DITHER_MAX,0,0); ...

After rendering, transparecy (or alpha) is lost. Gtk+ reference docs
says something about GdkGC and 'clips', but I can not understand it,
even looking at the GTK+ examples...

May be any example to perform this?


Daniel Campos <danielcampos netcourrier com>

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