Best way to get the R,G,B values from a GtkColor?



Hi,

Suppose we are given just the pointer to a GdkColor;
so sometimes the actual information will be in the
red/green/blue fields, and sometimes (for allocated
colors) it will be in the pixel.  What's the best
way to extract the actual R,G,B intensities from a
GdkColor?
I need it for this: I am trying to report the R,G,B values
of the foreground color of a GC given the pointer to it.
I got the foreground GdkColor, but it only has pixel value
set, and my code needs to run on any supported depth -
how do I extract the RGB intensities from there?





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