bpp-core3  3.0.0
bpp::ColorSet Class Referenceabstract

Specify a set of color definitions. More...

#include <Bpp/Graphics/ColorSet.h>

+ Inheritance diagram for bpp::ColorSet:

Public Member Functions

 ColorSet ()
 
virtual ~ColorSet ()
 
virtual const RGBColorgetColor (const std::string &name) const =0
 Get the color object corresponding to a given name. More...
 
virtual const RGBColorgetColor (unsigned int index) const =0
 Get the ith color object in the set. More...
 
virtual std::vector< std::string > getColorNames () const =0
 
virtual size_t getNumberOfColors () const =0
 

Detailed Description

Specify a set of color definitions.

Definition at line 56 of file ColorSet.h.

Constructor & Destructor Documentation

◆ ColorSet()

bpp::ColorSet::ColorSet ( )
inline

Definition at line 59 of file ColorSet.h.

◆ ~ColorSet()

virtual bpp::ColorSet::~ColorSet ( )
inlinevirtual

Definition at line 60 of file ColorSet.h.

Member Function Documentation

◆ getColor() [1/2]

virtual const RGBColor& bpp::ColorSet::getColor ( const std::string &  name) const
pure virtual

Get the color object corresponding to a given name.

Parameters
nameThe name of the color to look for.
Returns
The color associated to the given name.
Exceptions
Exceptionif the name is not assigned to any color.

Implemented in bpp::AbstractColorSet.

◆ getColor() [2/2]

virtual const RGBColor& bpp::ColorSet::getColor ( unsigned int  index) const
pure virtual

Get the ith color object in the set.

Parameters
indexThe index of the color to look for.
Returns
The color associated to the given index.
Exceptions
IndexOutOfBoundsExceptionif the index is not assigned to any color.

Implemented in bpp::AbstractColorSet.

◆ getColorNames()

virtual std::vector<std::string> bpp::ColorSet::getColorNames ( ) const
pure virtual
Returns
All valid color names.

Implemented in bpp::AbstractColorSet.

◆ getNumberOfColors()

virtual size_t bpp::ColorSet::getNumberOfColors ( ) const
pure virtual
Returns
The total number of colors available.

Implemented in bpp::AbstractColorSet.


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