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 62 of file ColorSet.h.
|
inline |
Definition at line 69 of file ColorSet.h.
|
inlinevirtual |
Definition at line 70 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 73 of file ColorSet.h.
|
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 80 of file ColorSet.h.
|
inlinevirtual |
Implements bpp::ColorSet.
Definition at line 88 of file ColorSet.h.
References bpp::MapTools::getKeys().
|
inlinevirtual |
Implements bpp::ColorSet.
Definition at line 90 of file ColorSet.h.
|
protected |
Definition at line 66 of file ColorSet.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::DvipsColorSet::DvipsColorSet(), bpp::MolscriptColorSet::MolscriptColorSet(), and bpp::RColorSet::RColorSet().