1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxColour class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "colour.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
23 #include "wx/gdicmn.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
31 m_red
= m_blue
= m_green
= 0;
35 wxColour::wxColour(unsigned char r
, unsigned char g
, unsigned char b
)
43 wxColour::wxColour(const wxColour
& col
)
46 m_green
= col
.m_green
;
48 m_isInit
= col
.m_isInit
;
51 wxColour
& wxColour::operator =(const wxColour
& col
)
54 m_green
= col
.m_green
;
56 m_isInit
= col
.m_isInit
;
60 void wxColour::InitFromName(const wxString
& col
)
62 wxColour
*the_colour
= wxTheColourDatabase
->FindColour (col
);
65 m_red
= the_colour
->Red();
66 m_green
= the_colour
->Green();
67 m_blue
= the_colour
->Blue();
83 void wxColour::Set(unsigned char r
, unsigned char g
, unsigned char b
)
92 #if WXWIN_COMPATIBILITY
93 void wxColour::Get(unsigned char *r
, unsigned char *g
, unsigned char *b
) const