X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c82d0d1383607ef5896253f0928a4a2d2d32a2..19cf1ef3a7077dd99a90f141847b8a9b67b318c9:/src/mac/carbon/colour.cpp?ds=sidebyside diff --git a/src/mac/carbon/colour.cpp b/src/mac/carbon/colour.cpp index 2572be337b..d752b70530 100644 --- a/src/mac/carbon/colour.cpp +++ b/src/mac/carbon/colour.cpp @@ -21,7 +21,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) -static void wxComposeRGBColor( WXCOLORREF* color , int red, int blue, int green ); +wxColour::wxColour(const RGBColor& col) +{ + FromRGBColor((WXCOLORREF *)&col); +} + static void wxComposeRGBColor( WXCOLORREF* color , int red, int blue, int green ) { RGBColor* col = (RGBColor*) color; @@ -63,3 +67,15 @@ void wxColour::FromRGBColor( WXCOLORREF* color ) m_blue = col->blue >> 8; m_green = col->green >> 8; } + +wxColour& wxColour::operator=(const RGBColor& col) +{ + FromRGBColor((WXCOLORREF *)&col); + return *this; +} + +bool wxColour::IsOk() const +{ + return m_isInit; +} +