]> git.saurik.com Git - wxWidgets.git/blob - src/generic/colour.cpp
fix compilation both for Robert's cross-compiler and for all normal compilers by...
[wxWidgets.git] / src / generic / colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/generic/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 #ifndef WX_PRECOMP
22 #include "wx/gdicmn.h"
23 #endif
24
25 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
26
27 // Colour
28
29 void wxColour::Init()
30 {
31 m_red =
32 m_blue =
33 m_green = 0;
34 m_isInit = false;
35 }
36
37 wxColour::wxColour()
38 {
39 Init();
40 }
41
42 wxColour::wxColour(const wxColour& col)
43 {
44 *this = col;
45 }
46
47 wxColour& wxColour::operator =(const wxColour& col)
48 {
49 m_red = col.m_red;
50 m_green = col.m_green;
51 m_blue = col.m_blue;
52 m_isInit = col.m_isInit;
53 return *this;
54 }
55
56 wxColour::~wxColour()
57 {
58 }
59
60 void wxColour::InitWith(unsigned char r, unsigned char g, unsigned char b)
61 {
62 m_red = r;
63 m_green = g;
64 m_blue = b;
65 m_isInit = true;
66 }