Re: [gtk-list] Re: Easy way to reverse a gtk_pixmap?



>  > Is there any easy way to (temporarily) reverse a gtk_pixmap; that is, every
>  > white pixel becomes black and every black pixel becomes white.
>  > 
>  
>  Not really - in general, if you want to manipulate or transform image data
>  then a pixmap is a poor choice (GdkPixmap is a server-side image,
>  GtkPixmap is a widget that displays it; the pixels are _not_ in your
>  process's address space!). 
>  
>  If you did want to do it, the procedure would be something like the
>  build_disabled_pixmap() routine in gtkpixmap.c, that is, you suck the
>  pixmap into a GdkImage (client side image data) then manipulate it.

If you just want to invert the pixmap, paint a rectangle over it with
the GDK_INVERT put function set in the GC.

  Federico



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