Re: NewbieQ: Changing color on drawing primitives



I have worked it out, great! :)


How do I work out which pixel value corresponds to which color opr RGB
ref? Is there a color referance or a simple way of working it out,
besides trial and error?


Thanks for the help,
-Jev

On Wed, Jul 18, 2001 at 10:12:48AM +0200, CALMELS Clement wrote:
GdkColor        color;

color->pixel = 0;
color->red = 65535;
color->green = 0;
color->blue = 0;

Then just try gdk_colormap_alloc_color. It's the functiun that allocated
the GdkColor, fixing the "pixel" value. You were right, a GdkColor with
a "pixel" value is an allocated one.
For more details, take a look at
http://developer.gnome.org/doc/API/gdk/gdk-colormaps-and-colors.html

Clement.

-- 
http://www.ecad.org/~jev/jev.gpg
Key fingerprint = 748B 2346 1683 6384 5E8D  4EE3 0807 EADB 999E AB95




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