]> git.saurik.com Git - wxWidgets.git/blame - src/mgl/colour.cpp
Warning fix.
[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
40989e46
WS
15#include "wx/colour.h"
16
32b8ec41 17#ifdef __BORLANDC__
40989e46 18 #pragma hdrstop
32b8ec41
VZ
19#endif
20
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}