]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
edc536d3 | 2 | // Name: src/msw/colour.cpp |
2bda0e17 KB |
3 | // Purpose: wxColour class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
6c9a19aa | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
2bda0e17 KB |
12 | // For compilers that support precompilation, includes "wx.h". |
13 | #include "wx/wxprec.h" | |
14 | ||
15 | #ifdef __BORLANDC__ | |
40989e46 | 16 | #pragma hdrstop |
2bda0e17 KB |
17 | #endif |
18 | ||
7cf41a5d WS |
19 | #include "wx/colour.h" |
20 | ||
dd05139a WS |
21 | #ifndef WX_PRECOMP |
22 | #include "wx/gdicmn.h" | |
23 | #endif | |
24 | ||
8cb172b4 | 25 | #include "wx/msw/private.h" |
2bda0e17 KB |
26 | |
27 | #include <string.h> | |
2bda0e17 | 28 | |
2bda0e17 KB |
29 | // Colour |
30 | ||
f75aecd0 | 31 | void wxColour::Init() |
2bda0e17 | 32 | { |
aad6765c | 33 | m_isInit = false; |
f75aecd0 | 34 | m_pixel = 0; |
c2b9ae5f | 35 | m_alpha = |
f75aecd0 VZ |
36 | m_red = |
37 | m_blue = | |
38 | m_green = 0; | |
2bda0e17 KB |
39 | } |
40 | ||
aea95b1c | 41 | void wxColour::InitRGBA(unsigned char r, unsigned char g, unsigned char b, |
c2b9ae5f | 42 | unsigned char a) |
2bda0e17 | 43 | { |
f75aecd0 VZ |
44 | m_red = r; |
45 | m_green = g; | |
46 | m_blue = b; | |
c2b9ae5f | 47 | m_alpha = a; |
aad6765c JS |
48 | m_isInit = true; |
49 | m_pixel = PALETTERGB(m_red, m_green, m_blue); | |
2bda0e17 | 50 | } |