NAME
CL_Palette - Palette class.
DESCRIPTION
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.
SEE ALSO
- CL_Display
-
The system palette is set here.
- CL_DisplayCard
-
The card specific system palette is set here.
- CL_SurfaceProvider
-
Palettelized surfaces use this class.
All ClanLib API classes can be found in clanlib (3).
AUTHORS
Originally written by Magnus Norddahl <[email protected]> and Martin Starch <[email protected]>. ClanLib is now developed by the ClanLib Development team as an Open Source project.
The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at http://somewhere.in.the.world.org).
See clanlib (3) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.