gdk color values



Hi,
  I'm using a GdkColor variable to paint a GtkDrawingArea. From the
example code in the Gtk2 distribution I see that the red, blue and green
values of a GdkColor struct can range from 0 to 65535. However my user
interface requires me to use RGB values in the range between 0 and 255.

Is there any standard way to map from a 0-255 range to the 0-65535 range
used by GdkColor?

Thanks,

-------------------------------------------------------------------
Rajarshi Guha <rajarshi presidency com> <http://jijo.cjb.net>
GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE
-------------------------------------------------------------------
The way to love anything is to realize that it might be lost.




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