Re: gdk color values



On Fri, 27 Jun 2003, Rajarshi Guha wrote:

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?

Multiplication?

-Peter

``Average programmers should be rounded up and placed in internment camps
to keep them away from keyboards.''



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