]>
Commit | Line | Data |
---|---|---|
32b8ec41 | 1 | ///////////////////////////////////////////////////////////////////////////// |
88ef3a57 | 2 | // Name: wx/mgl/palette.h |
32b8ec41 VZ |
3 | // Purpose: |
4 | // Author: Vaclav Slavik | |
5 | // Created: 2001/03/11 | |
6 | // Id: $Id$ | |
52750c2e | 7 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 8 | // Licence: wxWindows licence |
32b8ec41 VZ |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
32b8ec41 VZ |
11 | #ifndef __WX_PALETTE_H__ |
12 | #define __WX_PALETTE_H__ | |
13 | ||
32b8ec41 VZ |
14 | #include "wx/defs.h" |
15 | #include "wx/object.h" | |
16 | #include "wx/gdiobj.h" | |
17 | #include "wx/gdicmn.h" | |
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // classes | |
21 | //----------------------------------------------------------------------------- | |
22 | ||
b5dbe15d | 23 | class WXDLLIMPEXP_FWD_CORE wxPalette; |
32b8ec41 VZ |
24 | struct palette_t; |
25 | ||
26 | //----------------------------------------------------------------------------- | |
27 | // wxPalette | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
53a2db12 | 30 | class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase |
32b8ec41 | 31 | { |
32b8ec41 VZ |
32 | public: |
33 | wxPalette(); | |
34 | wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); | |
d3c7fc99 | 35 | virtual ~wxPalette(); |
32b8ec41 VZ |
36 | |
37 | bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue); | |
88ef3a57 | 38 | int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const; |
32b8ec41 VZ |
39 | bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const; |
40 | ||
41 | // implementation | |
917be7ed WS |
42 | virtual int GetColoursCount() const; |
43 | ||
32b8ec41 | 44 | palette_t *GetMGLpalette_t() const; |
8f884a0d VZ |
45 | |
46 | DECLARE_DYNAMIC_CLASS(wxPalette) | |
32b8ec41 VZ |
47 | }; |
48 | ||
32b8ec41 | 49 | #endif // __WX_PALETTE_H__ |