]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/colour.cpp
4232f86476e39ede8f4994d8236da9019e2e1e0e
[wxWidgets.git] / src / mgl / colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mgl/colour.cpp
3 // Purpose: wxColour class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 #include "wx/colour.h"
20
21 #include "wx/gdicmn.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
24
25 // Colour
26
27 void wxColour::Init()
28 {
29 m_red =
30 m_blue =
31 m_green = 0;
32 m_isInit = false;
33 }
34
35 wxColour::wxColour()
36 {
37 Init();
38 }
39
40 wxColour::wxColour(const wxColour& col)
41 {
42 *this = col;
43 }
44
45 wxColour& wxColour::operator =(const wxColour& col)
46 {
47 m_red = col.m_red;
48 m_green = col.m_green;
49 m_blue = col.m_blue;
50 m_isInit = col.m_isInit;
51 return *this;
52 }
53
54 wxColour::~wxColour()
55 {
56 }
57
58 void wxColour::InitWith(unsigned char r, unsigned char g, unsigned char b)
59 {
60 m_red = r;
61 m_green = g;
62 m_blue = b;
63 m_isInit = true;
64 }