Re: Colored XBM

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

 



herbertg@xxxxxxxxxxxxx wrote:

Hey there folks,

I'm trying to build an application which shows the same, simple image, in
different fore- and background colors.

The way I used to this in my old TK based applications was to use a "xbm" file
and "attach" this image to a TK-Label. Then I changed the fore- and background
color of the label to the required colors which in fact changed the color of the
image ).

Is there any way to do something similar with GTK?
I think you have to create a bitmap from the XBM data and then use it as the stipple in a GC when drawing on a pixmap. The pixmap can then be put in a GtkImage for display. See:

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk-draw-drawable

John
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux