bpp-core3  3.0.0
bpp::DvipsColorSet Class Reference

The dvips color definitions. More...

#include <Bpp/Graphics/Latex/DvipsColorSet.h>

+ Inheritance diagram for bpp::DvipsColorSet:
+ Collaboration diagram for bpp::DvipsColorSet:

Public Member Functions

 DvipsColorSet ()
 
virtual ~DvipsColorSet ()
 
const RGBColorgetColor (const std::string &name) const
 Get the color object corresponding to a given name. More...
 
const RGBColorgetColor (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, RGBColorcolors_
 

Detailed Description

The dvips color definitions.

Source: dvipsnam.def, from the TeXlive LaTeX distribution.

Definition at line 18 of file DvipsColorSet.h.

Constructor & Destructor Documentation

◆ DvipsColorSet()

DvipsColorSet::DvipsColorSet ( )

Definition at line 9 of file DvipsColorSet.cpp.

References bpp::AbstractColorSet::colors_.

◆ ~DvipsColorSet()

virtual bpp::DvipsColorSet::~DvipsColorSet ( )
inlinevirtual

Definition at line 23 of file DvipsColorSet.h.

Member Function Documentation

◆ getColor() [1/2]

const RGBColor& bpp::AbstractColorSet::getColor ( const std::string &  name) const
inlinevirtualinherited

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.

Implements bpp::ColorSet.

Definition at line 73 of file ColorSet.h.

◆ getColor() [2/2]

const RGBColor& bpp::AbstractColorSet::getColor ( unsigned int  index) const
inlinevirtualinherited

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.

Implements bpp::ColorSet.

Definition at line 80 of file ColorSet.h.

◆ getColorNames()

std::vector<std::string> bpp::AbstractColorSet::getColorNames ( ) const
inlinevirtualinherited
Returns
All valid color names.

Implements bpp::ColorSet.

Definition at line 88 of file ColorSet.h.

References bpp::MapTools::getKeys().

◆ getNumberOfColors()

size_t bpp::AbstractColorSet::getNumberOfColors ( ) const
inlinevirtualinherited
Returns
The total number of colors available.

Implements bpp::ColorSet.

Definition at line 90 of file ColorSet.h.

Member Data Documentation

◆ colors_

std::map<std::string, RGBColor> bpp::AbstractColorSet::colors_
protectedinherited

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