summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-06-12 16:38:02 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-16 11:10:27 +0100
commit7b81b2730ce92c7e0aebef534341aa55b5a668d2 (patch)
tree24ba4754dab38b4509e461a4ef5d059078175ad1
parent501e8f74520731462dbf9f27b05f28ae8bf0b7f1 (diff)
ColorData - for RGB macro use TRGB with transparency set to 0
Change-Id: Ia363e05768ac76a7cf4b4da6cbb57174b2d64682
-rw-r--r--include/tools/colordata.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tools/colordata.hxx b/include/tools/colordata.hxx
index 1d0fb42b4e39..2d8dbefe5d6f 100644
--- a/include/tools/colordata.hxx
+++ b/include/tools/colordata.hxx
@@ -25,9 +25,12 @@
typedef sal_uInt32 ColorData;
#define TRGB_COLORDATA(TRANSPARENCE,RED,GREEN,BLUE) \
- ((sal_Int32)(((sal_uInt32)((sal_uInt8)(BLUE))))|(((sal_uInt32)((sal_uInt8)(GREEN)))<<8)|(((sal_uInt32)((sal_uInt8)(RED)))<<16)|(((sal_uInt32)((sal_uInt8)(TRANSPARENCE)))<<24))
+ ((sal_Int32)(((sal_uInt32)((sal_uInt8)(BLUE)))) | \
+ (((sal_uInt32)((sal_uInt8)(GREEN)))<<8) | \
+ (((sal_uInt32)((sal_uInt8)(RED)))<<16) | \
+ (((sal_uInt32)((sal_uInt8)(TRANSPARENCE)))<<24))
-#define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16))
+#define RGB_COLORDATA( r,g,b ) TRGB_COLORDATA(0, r, g, b)
#define COLORDATA_RED( n ) ((sal_uInt8)((n)>>16))
#define COLORDATA_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8))