]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/palette.cpp
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "palette.h"
16 #include "wx/palette.h"
18 #if !USE_SHARED_LIBRARIES
19 IMPLEMENT_DYNAMIC_CLASS(wxPalette
, wxGDIObject
)
27 wxPaletteRefData::wxPaletteRefData()
32 wxPaletteRefData::~wxPaletteRefData()
37 wxPalette::wxPalette()
41 wxPalette::wxPalette(int n
, const unsigned char *red
, const unsigned char *green
, const unsigned char *blue
)
43 Create(n
, red
, green
, blue
);
46 wxPalette::~wxPalette()
50 bool wxPalette::Create(int n
, const unsigned char *red
, const unsigned char *green
, const unsigned char *blue
)
54 m_refData
= new wxPaletteRefData
;
61 int wxPalette::GetPixel(const unsigned char red
, const unsigned char green
, const unsigned char blue
) const
70 bool wxPalette::GetRGB(int index
, unsigned char *red
, unsigned char *green
, unsigned char *blue
) const
75 if (index
< 0 || index
> 255)