From 73ace49c5a12b556e873252032d3117152d90a3f Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 4 Dec 2010 21:52:26 +0000 Subject: Fix colours svn path=/trunk/netsurf/; revision=10989 --- css/utils.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'css/utils.h') diff --git a/css/utils.h b/css/utils.h index 71da8a41a..11403b5da 100644 --- a/css/utils.h +++ b/css/utils.h @@ -28,14 +28,16 @@ extern css_fixed nscss_screen_dpi; /** * Convert a CSS color to a NetSurf colour primitive * + * ARGB -> (1-A)BGR + * * \param color The CSS color to convert * \return Corresponding NetSurf colour primitive */ #define nscss_color_to_ns(color) \ - (((color) & 0xff000000) >> 24) | \ - (((color) & 0xff0000) >> 8) | \ - (((color) & 0xff00) << 8) | \ - (((color) & 0xff) << 24) + (0xff000000 - ((color) & 0xff000000)) | \ + (((color) & 0xff0000) >> 16) | \ + ((color) & 0xff00) | \ + (((color) & 0xff) << 16) css_fixed nscss_len2pt(css_fixed length, css_unit unit); css_fixed nscss_len2px(css_fixed length, css_unit unit, -- cgit v1.2.3