Inverting a pixmap



Hi,

    I have a xpm . I convert it into pixmap using the following
functions.

Pixmap = gdk_pixmap_colormap_create_from_xpm( eventbox->window ,
gdk_colormap_get_system(), NULL, NULL,Address.xpm);
Gtkpixmap = gtk_pixmap_new( Pixmap, FALSE ) ;

Now I want to invert Gtkpixmap. so I use
gtk_pixmap_get(  GTK_PIXMAP( Gtkpixmap ), &val, FALSE ) ;
gtk_pixmap_set( GTK_PIXMAP( Gtkpixmap ) , val , (gpointer)TRUE ) ;

This is giving segmentation fault.
The last parameter of gtk_pixmap_new, gtk_pixmap_get and gtk_pixmap_set
are GdkBitmap mask.
I didn't know what to put for this parameter in gtk_pixmap_new , so I
used FALSE and it worked fine.
What should I put for this parameter in gtk_pixmap_new ?? . And how to
use gtk_pixmap_set and gtk_pixmap_get functions to invert the existing
pixmap..........?

Thanks in advance,
Jyothi.







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