bpp-core3
3.0.0
|
Partial implementation of the ColorSet interface. More...
#include <Bpp/Graphics/ColorSet.h>
Public Member Functions | |
AbstractColorSet () | |
virtual | ~AbstractColorSet () |
const RGBColor & | getColor (const std::string &name) const |
Get the color object corresponding to a given name. More... | |
const RGBColor & | getColor (unsigned int index) const |
Get the ith color object in the set. More... | |
std::vector< std::string > | getColorNames () const |
size_t | getNumberOfColors () const |
Protected Attributes | |
std::map< std::string, RGBColor > | colors_ |
Partial implementation of the ColorSet interface.
Derivative classes just have to fill the colors_ map in the constructor of the class.
Definition at line 98 of file ColorSet.h.
|
inline |
Definition at line 105 of file ColorSet.h.
|
inlinevirtual |
Definition at line 106 of file ColorSet.h.
|
inlinevirtual |
Get the color object corresponding to a given name.
name | The name of the color to look for. |
Exception | if the name is not assigned to any color. |
Implements bpp::ColorSet.
Definition at line 109 of file ColorSet.h.
References colors_.
|
inlinevirtual |
Get the ith color object in the set.
index | The index of the color to look for. |
IndexOutOfBoundsException | if the index is not assigned to any color. |
Implements bpp::ColorSet.
Definition at line 116 of file ColorSet.h.
References colors_.
|
inlinevirtual |
Implements bpp::ColorSet.
Definition at line 124 of file ColorSet.h.
References colors_, and bpp::MapTools::getKeys().
|
inlinevirtual |
Implements bpp::ColorSet.
Definition at line 126 of file ColorSet.h.
References colors_.
|
protected |
Definition at line 102 of file ColorSet.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::DvipsColorSet::DvipsColorSet(), getColor(), getColorNames(), getNumberOfColors(), bpp::MolscriptColorSet::MolscriptColorSet(), and bpp::RColorSet::RColorSet().