How do I get r,g,b from gdk_gc_get_values?




In gdk_gc_get_values, the color of the GdkGC is set like this:

      values->foreground.pixel = xvalues.foreground;
      values->background.pixel = xvalues.background;

But values->foreground.{red,green,blue} are not set.  Is that
intentional?  If so, what's the appropriate way to convert the gulong
pixel value to it's constituent channels?  I poked around the source
for a while, but couldn't figure out the right answer.

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30



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