1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxColour
: public wxColourBase
26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
31 virtual bool IsOk() const { return m_isInit
; }
33 unsigned char Red() const { return m_red
; }
34 unsigned char Green() const { return m_green
; }
35 unsigned char Blue() const { return m_blue
; }
36 unsigned char Alpha() const { return m_alpha
; }
39 bool operator==(const wxColour
& colour
) const
41 return m_isInit
== colour
.m_isInit
42 && m_red
== colour
.m_red
43 && m_green
== colour
.m_green
44 && m_blue
== colour
.m_blue
45 && m_alpha
== colour
.m_alpha
;
48 bool operator!=(const wxColour
& colour
) const { return !(*this == colour
); }
50 WXCOLORREF
GetPixel() const { return m_pixel
; }
60 InitRGBA(unsigned char r
, unsigned char g
, unsigned char b
, unsigned char a
);
66 unsigned char m_green
;
67 unsigned char m_alpha
;
70 DECLARE_DYNAMIC_CLASS(wxColour
)
73 #endif // _WX_COLOUR_H_