]>
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::wxColour
37 , unsigned char cGreen
45 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
46 } // end of wxColour::wxColour
53 m_cGreen
= rCol
.m_cGreen
;
54 m_cBlue
= rCol
.m_cBlue
;
55 m_bIsInit
= rCol
.m_bIsInit
;
56 m_vPixel
= rCol
.m_vPixel
;
57 } // end of wxColour::wxColour
59 wxColour
& wxColour::operator =(
64 m_cGreen
= rCol
.m_cGreen
;
65 m_cBlue
= rCol
.m_cBlue
;
66 m_bIsInit
= rCol
.m_bIsInit
;
67 m_vPixel
= rCol
.m_vPixel
;
69 } // end of wxColour& wxColour::operator =
71 void wxColour::InitFromName(
75 wxColour
* pTheColour
= wxTheColourDatabase
->FindColour(sCol
);
79 m_cRed
= pTheColour
->Red();
80 m_cGreen
= pTheColour
->Green();
81 m_cBlue
= pTheColour
->Blue();
91 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
92 } // end of wxColour::InitFromName
94 wxColour::~wxColour ()
96 } // end of wxColour::~wxColour
100 , unsigned char cGreen
101 , unsigned char cBlue
108 m_vPixel
= OS2RGB (m_cRed
, m_cGreen
, m_cBlue
);
109 } // end of wxColour::Set