~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to src/msw/colour.cpp

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

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