2011-03-20 18:05:19 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/msw/palette.h
|
|
|
|
// Purpose: wxPalette class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_PALETTE_H_
|
|
|
|
#define _WX_PALETTE_H_
|
|
|
|
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxPalette() { }
|
|
|
|
wxPalette(int n,
|
2012-03-18 01:12:27 +00:00
|
|
|
const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
2011-03-20 18:05:19 +00:00
|
|
|
{
|
|
|
|
Create(n, red, green, blue);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(int n,
|
2012-03-18 01:12:27 +00:00
|
|
|
const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
2011-03-20 18:05:19 +00:00
|
|
|
|
|
|
|
virtual int GetColoursCount() const;
|
|
|
|
|
|
|
|
int
|
|
|
|
GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
GetRGB(int pixel,
|
|
|
|
unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
|
|
|
|
|
|
|
// implemetation
|
|
|
|
WXHPALETTE GetHPALETTE() const;
|
|
|
|
void SetHPALETTE(WXHPALETTE pal);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_PALETTE_H_
|