/**
@class wxPalette
- @ingroup group_class_gdi
@wxheader{palette.h}
A palette is a table that maps pixel values to RGB colours. It allows the
/**
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
-
+
@param palette
A pointer or reference to the palette to copy.
@param n
An array of green values.
@param blue
An array of blue values.
-
+
@see Create()
*/
wxPalette();
/**
Creates a palette from arrays of size @e n, one for each
red, blue or green component.
-
+
@param n
The number of indices in the palette.
@param red
An array of green values.
@param blue
An array of blue values.
-
+
@returns @true if the creation was successful, @false otherwise.
-
+
@see wxPalette()
*/
bool Create(int n, const unsigned char* red,
/**
Returns a pixel value (index into the palette) for the given RGB values.
-
+
@param red
Red value.
@param green
Green value.
@param blue
Blue value.
-
+
@returns The nearest palette index or wxNOT_FOUND for unexpected errors.
-
+
@see GetRGB()
*/
int GetPixel(unsigned char red, unsigned char green,
/**
Returns RGB values for a given palette index.
-
+
@param pixel
The palette index.
@param red
Receives the green value.
@param blue
Receives the blue value.
-
+
@returns @true if the operation was successful.
-
+
@see GetPixel()
*/
bool GetRGB(int pixel, const unsigned char* red,