#include <Palette.hpp>
Each entry in the pallete is a color at a certain position. Indexes into this palette can be anywhere within its range and the corresponding color will be interpolated.
Definition at line 46 of file Palette.hpp.
Public Member Functions | |
| Palette (const Color &base=Color::BLACK, double imin=0.0, double imax=1.0) | |
| Constructor. | |
| Palette (const Palette &p) | |
| Copy Constructor. | |
| Palette & | operator= (Palette p) |
| Copy Operator. | |
| ~Palette () | |
| Destructor. | |
| void | setRange (double imin, double imax) |
| Set the range Note: Does not change indicies already in the palette. | |
| void | setColor (double val, const Color &c) |
| Set the color a val to c. | |
| Color | getColor (double val) const |
| Get the color at val. | |
| double | getMin () const |
| Get the minimum. | |
| double | getMax () const |
| Get the maximum. | |
| int | getNumColors () const |
| Get number of entries. | |
Protected Member Functions | |
| void | clamp (double &val) const |
| Clamp the value between the minimum and maximum. | |
Protected Attributes | |
| double | min |
| Minimum. | |
| double | width |
| Width of the palette (such that: max = min+width). | |
| std::list< std::pair< double, Color > > | palette |
| The (index,color) pairs of the palette. | |
|
||||||||||||||||
|
Constructor.
|
|
|
Copy Constructor.
|
|
|
Destructor.
Definition at line 64 of file Palette.hpp. |
|
|
Clamp the value between the minimum and maximum.
Definition at line 110 of file Palette.hpp. |
|
|
Get the color at val.
Referenced by ColorMap::ColorMap(), and PNG::plte(). |
|
|
Get the maximum.
Definition at line 94 of file Palette.hpp. |
|
|
Get the minimum.
Definition at line 91 of file Palette.hpp. |
|
|
Get number of entries.
Definition at line 97 of file Palette.hpp. |
|
|
Copy Operator.
|
|
||||||||||||
|
Set the color a val to c.
|
|
||||||||||||
|
Set the range Note: Does not change indicies already in the palette.
Definition at line 70 of file Palette.hpp. |
|
|
Minimum.
Definition at line 101 of file Palette.hpp. |
|
|
The (index,color) pairs of the palette.
Definition at line 107 of file Palette.hpp. |
|
|
Width of the palette (such that: max = min+width).
Definition at line 104 of file Palette.hpp. |
1.3.9.1