Re: [gtk-list] Re: how to convert windows RGB color to GdkColor



   This is not enough.  You then need to add the original value.  I.e. 

	   new_value = (old_value << 8) + old_value;

   Assuming old_value is in [0, 255].

I thought I understood gdkcolors until now.  I have always been under
the impression that a gdkcolor simply uses a 16-bit value for each of
red, green, and blue, and that it was converted for whatever hardware
you were to run on by dividing (so, to run on something with 8-bit
DACs, you'd right-shift by (16-8) == 8).

You seem to be saying that a gdkcolor is just an eight-bit value
repeated twice.  What's the point?
-- 
Joseph J. Pfeiffer, Jr., Ph.D.       Phone -- (505) 646-1605
Department of Computer Science       FAX   -- (505) 646-1002
New Mexico State University          http://www.cs.nmsu.edu/~pfeiffer



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