X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f61ed7ee42d7647663e48ac55062be0935bb07aa..a8b2285edf2eb1ef1dd1cb19abf130a871821dbf:/src/mac/carbon/colour.cpp diff --git a/src/mac/carbon/colour.cpp b/src/mac/carbon/colour.cpp index e9237fdbc6..6a3562c3d4 100644 --- a/src/mac/carbon/colour.cpp +++ b/src/mac/carbon/colour.cpp @@ -13,7 +13,9 @@ #include "wx/colour.h" -#include "wx/gdicmn.h" +#ifndef WX_PRECOMP + #include "wx/gdicmn.h" +#endif #include "wx/mac/private.h" @@ -42,17 +44,18 @@ wxColour::~wxColour () { } -void wxColour::InitWith (unsigned char r, unsigned char g, unsigned char b) +void wxColour::InitRGBA (unsigned char r, unsigned char g, unsigned char b, unsigned char a) { m_red = r; m_green = g; m_blue = b; + m_alpha = a ; m_isInit = true; wxComposeRGBColor( &m_pixel , m_red , m_blue , m_green ); } -void wxColour::FromRGBColor( const WXCOLORREF* color ) +void wxColour::FromRGBColor( WXCOLORREF* color ) { RGBColor* col = (RGBColor*) color; memcpy( &m_pixel, color, 6 ); @@ -60,3 +63,9 @@ void wxColour::FromRGBColor( const WXCOLORREF* color ) m_blue = col->blue >> 8; m_green = col->green >> 8; } + +bool wxColour::IsOk() const +{ + return m_isInit; +} +