1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxColour class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
15 #include "wx/gdicmn.h"
20 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
28 m_cRed
= m_cBlue
= m_cGreen
= 0;
29 } // end of wxColour::wxColour
33 , unsigned char cGreen
41 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
42 } // end of wxColour::wxColour
49 m_cGreen
= rCol
.m_cGreen
;
50 m_cBlue
= rCol
.m_cBlue
;
51 m_bIsInit
= rCol
.m_bIsInit
;
52 m_vPixel
= rCol
.m_vPixel
;
53 } // end of wxColour::wxColour
55 wxColour
& wxColour::operator =(
60 m_cGreen
= rCol
.m_cGreen
;
61 m_cBlue
= rCol
.m_cBlue
;
62 m_bIsInit
= rCol
.m_bIsInit
;
63 m_vPixel
= rCol
.m_vPixel
;
65 } // end of wxColour& wxColour::operator =
67 void wxColour::InitFromName(
71 wxColour
* pTheColour
= wxTheColourDatabase
->FindColour(sCol
);
75 m_cRed
= pTheColour
->Red();
76 m_cGreen
= pTheColour
->Green();
77 m_cBlue
= pTheColour
->Blue();
87 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
88 } // end of wxColour::InitFromName
90 wxColour::~wxColour ()
92 } // end of wxColour::~wxColour
96 , unsigned char cGreen
104 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
105 } // end of wxColour::Set
110 #if WXWIN_COMPATIBILITY
113 , unsigned char* pGreen
114 , unsigned char* pBlue
120 } // end of wxColour::Get