Phoenard
Public Member Functions | List of all members
PHN_Palette Class Reference

A color Palette that can store up to 256 colors. More...

#include <PHNPalette.h>

Public Member Functions

 PHN_Palette ()
 Constructs a new empty palette.
 
 PHN_Palette (const color_t *colors, int colorCount)
 Constructs a new palette with the colors specified.
 
void setAll (const color_t *colors, int colorCount)
 Sets all the colors for the palette at once.
 
void set (int index, color_t color)
 Sets a single color at an index in the palette.
 
color_t get (int index) const
 Gets a single color set at the index, BLACK if index out of range.
 
int count () const
 Gets how many colors are stored inside this palette.
 
color_tdata () const
 Gets access to the raw color_t array data stored.
 

Detailed Description

A color Palette that can store up to 256 colors.

Getting colors outside the range set returns BLACK. Setting colors outside the current range resizing the palette to fit the new indices.


The documentation for this class was generated from the following files: