[Libreoffice-commits] .: external/gdiplus

Tor Lillqvist tml at kemper.freedesktop.org
Thu Jul 14 08:18:34 PDT 2011


 external/gdiplus/include/gdipluscolor.h |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 3b3f8431197dcf9d940ecb57868a931ec74dc472
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Thu Jul 14 18:17:37 2011 +0300

    Add constructor and GetValue() method to the Color class

diff --git a/external/gdiplus/include/gdipluscolor.h b/external/gdiplus/include/gdipluscolor.h
index 39b7cb6..47a2e04 100644
--- a/external/gdiplus/include/gdipluscolor.h
+++ b/external/gdiplus/include/gdipluscolor.h
@@ -30,9 +30,17 @@ enum ColorChannelFlags
 
 #ifdef __cplusplus
 
-/* FIXME: missing the methods. */
 class Color
 {
+ public:
+    Color(BYTE a, BYTE r, BYTE g, BYTE b)
+    {
+        Argb = (((a<<24)&0xFF000000) | ((r<<16)&0x00FF0000) | ((g<<8)&0x0000FF00) | (b&0x000000FF));
+    }
+    ARGB GetValue() const
+    {
+        return Argb;
+    }
 protected:
     ARGB Argb;
 };


More information about the Libreoffice-commits mailing list