]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/colour.cpp
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"
16 #include "wx/colour.h"
19 #include "wx/gdicmn.h"
24 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
32 m_cRed
= m_cBlue
= m_cGreen
= 0;
33 } // end of wxColour::Init
38 } // end of wxColour::wxColour
42 , unsigned char cGreen
46 Set(cRed
, cGreen
, cBlue
);
47 } // end of wxColour::wxColour
54 } // end of wxColour::wxColour
56 wxColour
& wxColour::operator =(
61 m_cGreen
= rCol
.m_cGreen
;
62 m_cBlue
= rCol
.m_cBlue
;
63 m_bIsInit
= rCol
.m_bIsInit
;
64 m_vPixel
= rCol
.m_vPixel
;
66 } // end of wxColour& wxColour::operator =
68 void wxColour::InitFromName(
72 if ( wxTheColourDatabase
)
74 wxColour col
= wxTheColourDatabase
->Find(sCol
);
85 } // end of wxColour::InitFromName
89 } // end of wxColour::~wxColour
93 , unsigned char cGreen
101 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
102 } // end of wxColour::Set