Re: colors in pixmap



From: Marco Lettere <lettere di unipi it>
>
> hello everyone,
>
> suppose I've a pixmap with a color which I want to modify with 3 slider
> widgets for RGB.
> The way I'm performing it now is to destroy the old pixmap, change the xpm
> C structure and then recreate the pixmap with the new data.
> Isn't there a better way (less expensive) of performing this operation
> I'm thinking about something like
>
> gtk_pixmap_update_color(Gtkpixmap* pix,int colorIndex,GdkColor* newColor);

Is this just a solid color pixmap? If so, you could just
use gdk_draw_rectangle(), and avoid using the xpm entirely. If not,
you probably should create a series of pixmaps, one for each color,
and swap them in and out.

Ron Steinke



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