Re: colormaps



Olexiy Avramchenko wrote:
Russell Shaw wrote:

Hi,

In an expose-event callback of a gtk_drawing_area this always paints
a black region even tho i have it set for white:
...

You should allocate colors before gdk_gc_set_*ground calls. You see the black color because of zero *pixel* field value in foreground/background structures. If you want to avoid color allocation - use gdk_gc_set_rgb_*_color functions:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color

Thanks.
I never understand colormaps stuff until now: http://www.gtk.org/faq/#AEN834




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