Mercurial > hg > xemacs-beta
comparison src/objects-msw.c @ 243:f220cc83d72e r20-5b20
Import from CVS: tag r20-5b20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:17:07 +0200 |
parents | 41f2f0e326e9 |
children | 51092a27c943 |
comparison
equal
deleted
inserted
replaced
242:fc816b73a05f | 243:f220cc83d72e |
---|---|
827 | 827 |
828 static Lisp_Object | 828 static Lisp_Object |
829 mswindows_color_instance_rgb_components (struct Lisp_Color_Instance *c) | 829 mswindows_color_instance_rgb_components (struct Lisp_Color_Instance *c) |
830 { | 830 { |
831 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c); | 831 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c); |
832 return (list3 (make_int (GetRValue(color)<<8), | 832 /* This used to say GetXValue(color)<<8, but that made, e.g. white |
833 make_int (GetGValue(color)<<8), | 833 show as (#xff00 #xff00 #xff00) instead of (#xffff #xffff #xffff). |
834 make_int (GetBValue(color)<<8))); | 834 This slightly kludgier variant gives the expected results for |
835 black and white, while hopefully not introducing too much error. */ | |
836 return list3 (make_int (GetRValue (color) * 257), | |
837 make_int (GetGValue (color) * 257), | |
838 make_int (GetBValue (color) * 257)); | |
835 } | 839 } |
836 | 840 |
837 static int | 841 static int |
838 mswindows_valid_color_name_p (struct device *d, Lisp_Object color) | 842 mswindows_valid_color_name_p (struct device *d, Lisp_Object color) |
839 { | 843 { |