transparent pixels with pixmap



Hi !

I have a .xpm with some transparent pixels (made with gimp) I wish to load in a GdkPixmap but transparent 
pixels are white displayed.

Here is how I try to do that :

pixmap=gdk_pixmap_colormap_create_from_xpm(NULL, gtk_widget_get_colormap(window), &trans_mask, NULL, 
"/.pic.xpm");

where 'window' is correctly initialised and trans_mask copied/pasted from a .xbm made with gimp (representing 
the pixels I don't want to diplay, I changed 'static unsigned short' with 'static unsigned char' to match the 
second parameter of gdk_bitmap_create_from_data() )

I tried with a GdkColor as transparent color and change the .xpm to match the color(transparent pixel -> 
white), doesn't work too.

Can you give me an advice please ?

Greg 



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