Re: [gtkmm] Gdk::Color - can't understand
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Gdk::Color - can't understand
- Date: 03 Jul 2003 15:24:37 +0200
Igor Gorbounov <igorbounov voronezh serw ru> writes:
[...]
> >Maybe to cover all formats of colors ans keep it platform independent
> >(scanner, printer, ...)
> >(incl. alpha and other stuff) in GdkColor.
> >I have no prolems with 2 bytes per color unit.
>
> Well, but I do. When I pick up colors from my windows version of a program,
> Gimp shows me only byte-sized values, so I wonder if I had to append to it
> a 00-byte or 0xFF-byte - I don't notice the difference, but may be
> someone can.
I would just suggest that you scale them by multiplying them with 256.
That amounts to an 8-bit left shift. Which is the same as appending
0x00 AFAIK. As long as you promote all the colours in the same way, I
think it is very unlikely that anyone can see the difference.
The low-order bits are probably thrown away before sending the colour
value to the graphics device anyway.
--
Ole Laursen
http://www.cs.auc.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]