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