Add constructor and GetValue() method to the Color class

This commit is contained in:
Tor Lillqvist
2011-07-14 18:17:37 +03:00
parent c25d059a8b
commit 490b499531

View File

@@ -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;
};