Hi,
Thanks to Sven for the advice, I tried with no luck... what I want to do
is to load a bitmap from a png (and I do this with GdkPixbuf, fine), then
create another one with the negative image of it, and use them both with
gtk_widget_shape_combine_mask. So, I wrote this:
/**
* bitmap_invert
* @src: the bitmap to invert
*
* Creates a negative copy of a GdkBitmap
**/
GdkBitmap *bitmap_invert(GdkBitmap *src){
GdkBitmap *dest;
GdkGC *gc;
dest=gdk_pixmap_new(NULL,48,48,1);
gc=gdk_gc_new(src);//
gdk_gc_set_function(gc,GDK_INVERT);//
gdk_draw_pixmap(dest,gc,src,0,0,0,0,-1,-1);//
return dest;
}
if I apply it, it gives me a random bitmap... totally broken, with few
white dots on black field. If I try to uncomment the lines with the // at
the end, leaving the sole initializer, it gives to me... the same thing!!
other patterns, of course, just random dots with black prevalence... Where
am I wrong? I really don't know! :( May you help me?
Mano :)
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list