CL_Palette3
Palette class.
Overview
CL_Palette represents a palette in the form of a 256 byte array.
Palettes are in ClanLib only used by surface providers. A provider specifies it's palette by returning a CL_Palette. But It can also choose to return NULL. In that case it will use the system palette. You can change the system palette from CL_Display or CL_DisplayCard.
Class members
- unsigned char *
palette
- int
num_colors
CL_Palette()
- virtual
~CL_Palette()
CL_Palette(-
unsigned char *palette, int num_colors=256)
CL_Palette(-
char *palette_id, CL_InputSourceProvider *provider)
CL_Palette(-
CL_InputSource *input)
Members with descriptions
- unsigned char *
palette -
Description:
The actual palette. 1 byte for each color component (rgb), 256 colors. = new unsigned char[num_colors*3]
- int
num_colors -
Description:
Number of colours in the palette.
CL_Palette()-
Description:
Creates a palette.
- virtual
~CL_Palette() -
Description:
CL_Palette(-
unsigned char *palette, int num_colors=256)
Parameters: palette - palette source. num_colors - number of palette colors.
Description:
Creates a palette using values from an unsigned char array.
CL_Palette(-
char *palette_id, CL_InputSourceProvider *provider)
Parameters: palette_id - ID used to get palette from provider. provider - Input source type (eg. a datafile or a normal file).
Description:
Creates a palette from a input source.
CL_Palette(-
CL_InputSource *input)
Parameters: input - Input source to read from.
Description:
Creates a palette from an already open input source.