]> git.saurik.com Git - wxWidgets.git/blame - src/generic/colour.cpp
Fix install_name_tool calls in OS X "make install".
[wxWidgets.git] / src / generic / colour.cpp
CommitLineData
32b8ec41 1/////////////////////////////////////////////////////////////////////////////
3da12c22 2// Name: src/generic/colour.cpp
32b8ec41
VZ
3// Purpose: wxColour class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
e3a1e3e0 7// Copyright: (c) Julian Smart
edc536d3 8// Licence: wxWindows licence
32b8ec41
VZ
9/////////////////////////////////////////////////////////////////////////////
10
32b8ec41
VZ
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
40989e46 15 #pragma hdrstop
32b8ec41
VZ
16#endif
17
7cf41a5d
WS
18#include "wx/colour.h"
19
dd05139a
WS
20#ifndef WX_PRECOMP
21 #include "wx/gdicmn.h"
22#endif
32b8ec41 23
32b8ec41
VZ
24// Colour
25
564a150b 26void wxColour::Init()
32b8ec41 27{
564a150b
VZ
28 m_red =
29 m_blue =
30 m_green = 0;
7f5426f0 31 m_alpha = wxALPHA_OPAQUE;
aad6765c 32 m_isInit = false;
32b8ec41
VZ
33}
34
e35dd7d3
VS
35void wxColour::InitRGBA(unsigned char r,
36 unsigned char g,
37 unsigned char b,
38 unsigned char a)
39{
40 m_red = r;
41 m_green = g;
42 m_blue = b;
43 m_alpha = a;
44 m_isInit = true;
45}
46
7f5426f0 47wxColour& wxColour::operator=(const wxColour& col)
32b8ec41 48{
564a150b
VZ
49 m_red = col.m_red;
50 m_green = col.m_green;
51 m_blue = col.m_blue;
7f5426f0 52 m_alpha = col.m_alpha;
564a150b
VZ
53 m_isInit = col.m_isInit;
54 return *this;
32b8ec41
VZ
55}
56