2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-10-06 10:37:43 -04:00
|
|
|
// Name: wx/mgl/palette.h
|
2001-06-26 17:05:06 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2001/03/11
|
|
|
|
// Id: $Id$
|
2002-02-14 15:30:34 -05:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_PALETTE_H__
|
|
|
|
#define __WX_PALETTE_H__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPalette;
|
2001-06-26 17:05:06 -04:00
|
|
|
struct palette_t;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPalette
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
|
2001-06-26 17:05:06 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxPalette();
|
|
|
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxPalette();
|
2001-06-26 17:05:06 -04:00
|
|
|
|
|
|
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
2005-10-06 10:37:43 -04:00
|
|
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
2001-06-26 17:05:06 -04:00
|
|
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
|
|
|
|
|
|
|
// implementation
|
2004-12-08 12:43:18 -05:00
|
|
|
virtual int GetColoursCount() const;
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
palette_t *GetMGLpalette_t() const;
|
2007-12-15 12:54:20 -05:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPalette)
|
2001-06-26 17:05:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __WX_PALETTE_H__
|