]>
git.saurik.com Git - wxWidgets.git/blob - src/mgl/colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxColour class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
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"
24 #include "wx/colour.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
32 m_red
= m_blue
= m_green
= 0;
36 wxColour::wxColour(unsigned char r
, unsigned char g
, unsigned char b
)
44 wxColour::wxColour(const wxColour
& col
)
47 m_green
= col
.m_green
;
49 m_isInit
= col
.m_isInit
;
52 wxColour
& wxColour::operator =(const wxColour
& col
)
55 m_green
= col
.m_green
;
57 m_isInit
= col
.m_isInit
;
61 void wxColour::InitFromName(const wxString
& col
)
63 wxColour
*the_colour
= wxTheColourDatabase
->FindColour (col
);
66 m_red
= the_colour
->Red();
67 m_green
= the_colour
->Green();
68 m_blue
= the_colour
->Blue();
84 void wxColour::Set(unsigned char r
, unsigned char g
, unsigned char b
)
93 #if WXWIN_COMPATIBILITY
94 void wxColour::Get(unsigned char *r
, unsigned char *g
, unsigned char *b
) const