]> git.saurik.com Git - wxWidgets.git/blob - src/os2/colour.cpp
use iterators instead of c_str()
[wxWidgets.git] / src / os2 / colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/colour.cpp
3 // Purpose: wxColour class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #include "wx/colour.h"
16
17 #ifndef WX_PRECOMP
18 #include "wx/gdicmn.h"
19 #endif
20
21 #define INCL_GPI
22 #define INCL_PM
23 #include<os2.h>
24
25 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxGDIObject)
26
27 // Colour
28
29 void wxColour::Init()
30 {
31 m_bIsInit = false;
32 m_vPixel = 0;
33 m_cRed = m_cBlue = m_cGreen = 0;
34 } // end of wxColour::Init
35
36 wxColour::wxColour ()
37 {
38 Init();
39 } // end of wxColour::wxColour
40
41 wxColour::wxColour( const wxColour& rCol )
42 {
43 *this = rCol;
44 } // end of wxColour::wxColour
45
46 wxColour& wxColour::operator= (const wxColour& rCol)
47 {
48 m_cRed = rCol.m_cRed;
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 return *this;
54 } // end of wxColour& wxColour::operator =
55
56 wxColour::~wxColour()
57 {
58 } // end of wxColour::~wxColour
59
60 void wxColour::InitRGBA( unsigned char cRed,
61 unsigned char cGreen,
62 unsigned char cBlue,
63 unsigned char WXUNUSED(calpha) )
64 {
65 m_cRed = cRed;
66 m_cGreen = cGreen;
67 m_cBlue = cBlue;
68 m_bIsInit = true;
69 m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue);
70 } // end of wxColour::Set