|
From: | Jason Rumney |
Subject: | Re: define_color vs. xw-color-values, or pixel vs. red, green and blue |
Date: | Wed, 14 Feb 2007 18:56:07 +0000 |
User-agent: | Thunderbird 1.5.0.9 (Windows/20061207) |
Juanma Barranquero wrote:
So I suppose the question is: why does xw-color-values do return list3 (make_number ((GetRValue (foo.pixel) << 8) | GetRValue (foo.pixel)), make_number ((GetGValue (foo.pixel) << 8) | GetGValue (foo.pixel)), make_number ((GetBValue (foo.pixel) << 8) | GetBValue (foo.pixel))); instead of return list3 (make_number (foo.red), make_number (foo.green), make_number (foo.blue));
I think the bug is actually in w32_defined_color. White should map to (ffff,ffff,ffff), which it does using the code in xw-color-values, but w32_defined_color maps it to (ff00,ff00,ff00). This is due to windows only supporting 8 bits per color channel, while Emacs expects 16.
Correcting this bug would allow us to use the latter code in xw-color-values, which is more clear.
[Prev in Thread] | Current Thread | [Next in Thread] |