]>
Commit | Line | Data |
---|---|---|
0e320a79 | 1 | ///////////////////////////////////////////////////////////////////////////// |
edc536d3 | 2 | // Name: src/os2/colour.cpp |
0e320a79 | 3 | // Purpose: wxColour class |
37f214d5 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
37f214d5 | 6 | // Created: 10/13/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
37f214d5 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
37f214d5 DW |
12 | // For compilers that support precompilation, includes "wx.h". |
13 | #include "wx/wxprec.h" | |
0e320a79 | 14 | |
40989e46 WS |
15 | #include "wx/colour.h" |
16 | ||
4fe9efc1 | 17 | #ifndef WX_PRECOMP |
dd05139a | 18 | #include "wx/gdicmn.h" |
4fe9efc1 SN |
19 | #endif |
20 | ||
37f214d5 DW |
21 | #define INCL_GPI |
22 | #define INCL_PM | |
23 | #include<os2.h> | |
0e320a79 | 24 | |
0e320a79 DW |
25 | // Colour |
26 | ||
aad6765c | 27 | void wxColour::Init() |
0e320a79 | 28 | { |
aad6765c | 29 | m_bIsInit = false; |
a0606634 DW |
30 | m_vPixel = 0; |
31 | m_cRed = m_cBlue = m_cGreen = 0; | |
aad6765c JS |
32 | } // end of wxColour::Init |
33 | ||
6b5d2431 | 34 | wxColour::wxColour( const wxColour& rCol ) |
0e320a79 | 35 | { |
6d63b094 | 36 | *this = rCol; |
a0606634 | 37 | } // end of wxColour::wxColour |
0e320a79 | 38 | |
6b5d2431 | 39 | wxColour& wxColour::operator= (const wxColour& rCol) |
0e320a79 | 40 | { |
a0606634 DW |
41 | m_cRed = rCol.m_cRed; |
42 | m_cGreen = rCol.m_cGreen; | |
43 | m_cBlue = rCol.m_cBlue; | |
44 | m_bIsInit = rCol.m_bIsInit; | |
45 | m_vPixel = rCol.m_vPixel; | |
46 | return *this; | |
47 | } // end of wxColour& wxColour::operator = | |
0e320a79 | 48 | |
aad6765c | 49 | wxColour::~wxColour() |
0e320a79 | 50 | { |
a0606634 | 51 | } // end of wxColour::~wxColour |
0e320a79 | 52 | |
aea95b1c | 53 | void wxColour::InitRGBA( unsigned char cRed, |
6b5d2431 | 54 | unsigned char cGreen, |
aea95b1c VZ |
55 | unsigned char cBlue, |
56 | unsigned char WXUNUSED(calpha) ) | |
0e320a79 | 57 | { |
a0606634 DW |
58 | m_cRed = cRed; |
59 | m_cGreen = cGreen; | |
60 | m_cBlue = cBlue; | |
aad6765c | 61 | m_bIsInit = true; |
26ac77db | 62 | m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue); |
a0606634 | 63 | } // end of wxColour::Set |