X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8855e47254a28f5141524b3aaaac03c2944e997..e7445ff8ee26e39fab1e35455e1bef954bdf636f:/src/mac/carbon/colour.cpp diff --git a/src/mac/carbon/colour.cpp b/src/mac/carbon/colour.cpp index 864bd6f749..e9237fdbc6 100644 --- a/src/mac/carbon/colour.cpp +++ b/src/mac/carbon/colour.cpp @@ -11,9 +11,10 @@ #include "wx/wxprec.h" -#include "wx/gdicmn.h" #include "wx/colour.h" +#include "wx/gdicmn.h" + #include "wx/mac/private.h" IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject) @@ -37,27 +38,11 @@ void wxColour::Init() wxComposeRGBColor( &m_pixel, m_red, m_blue, m_green ); } -void wxColour::InitFromName(const wxString& name) -{ - if ( wxTheColourDatabase ) - { - wxColour col = wxTheColourDatabase->Find( name ); - if ( col.Ok() ) - { - *this = col; - return; - } - } - - // leave invalid - Init(); -} - wxColour::~wxColour () { } -void wxColour::Set (unsigned char r, unsigned char g, unsigned char b) +void wxColour::InitWith (unsigned char r, unsigned char g, unsigned char b) { m_red = r; m_green = g; @@ -67,7 +52,7 @@ void wxColour::Set (unsigned char r, unsigned char g, unsigned char b) wxComposeRGBColor( &m_pixel , m_red , m_blue , m_green ); } -void wxColour::Set( const WXCOLORREF* color ) +void wxColour::FromRGBColor( const WXCOLORREF* color ) { RGBColor* col = (RGBColor*) color; memcpy( &m_pixel, color, 6 );