1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/object.h"
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
25 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
30 virtual bool IsOk() const { return m_isInit
; }
32 unsigned char Red() const { return m_red
; }
33 unsigned char Green() const { return m_green
; }
34 unsigned char Blue() const { return m_blue
; }
35 unsigned char Alpha() const { return m_alpha
; }
38 bool operator==(const wxColour
& colour
) const
40 return m_isInit
== colour
.m_isInit
41 && m_red
== colour
.m_red
42 && m_green
== colour
.m_green
43 && m_blue
== colour
.m_blue
44 && m_alpha
== colour
.m_alpha
;
47 bool operator!=(const wxColour
& colour
) const { return !(*this == colour
); }
49 WXCOLORREF
GetPixel() const { return m_pixel
; }
59 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
65 unsigned char m_green
;
66 unsigned char m_alpha
;
69 DECLARE_DYNAMIC_CLASS(wxColour
)
72 #endif // _WX_COLOUR_H_