The Original CHomP Software
|
Provides a palette of distinct RGB colors. More...
#include <colorpal.h>
Public Member Functions | |
ColorPalette (int _n, bool grays=false, bool pycolors=false) | |
The constructor of a palette of a prescribed size. More... | |
~ColorPalette () | |
The destructor. More... | |
int | operator[] (int i) const |
Returns the color with the given number. More... | |
Private Member Functions | |
ColorPalette (const ColorPalette &src) | |
The copy constructor is not allowed. More... | |
ColorPalette & | operator= (const ColorPalette &src) |
The assignment operator is not allowed. More... | |
Static Private Member Functions | |
static int | generateComponent (int bitMask) |
Generates a color component based on the bit mask. More... | |
Private Attributes | |
int | n |
The number of colors in the palette. More... | |
int * | colors |
The RBG colors in the palette. More... | |
Provides a palette of distinct RGB colors.
The first color is black unless pycolors is set to true. If using the pycolors option, python-style color palette is provided. White is considered a background color and thus is not provided.
Definition at line 52 of file colorpal.h.
|
inline |
The constructor of a palette of a prescribed size.
Definition at line 100 of file colorpal.h.
References colors, generateComponent(), and n.
|
inline |
|
inlineprivate |
The copy constructor is not allowed.
Definition at line 191 of file colorpal.h.
|
inlinestaticprivate |
Generates a color component based on the bit mask.
The nonzero bits are every 3 locations in the mask.
Definition at line 86 of file colorpal.h.
Referenced by ColorPalette().
|
inlineprivate |
The assignment operator is not allowed.
Definition at line 196 of file colorpal.h.
|
inline |
|
private |
The RBG colors in the palette.
Definition at line 80 of file colorpal.h.
Referenced by ColorPalette(), operator[](), and ~ColorPalette().
|
private |
The number of colors in the palette.
Definition at line 77 of file colorpal.h.
Referenced by ColorPalette(), and operator[]().