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 54 of file DvipsColorSet.h.

Constructor & Destructor Documentation

◆ DvipsColorSet()

DvipsColorSet::DvipsColorSet ( )

Definition at line 46 of file DvipsColorSet.cpp.

References bpp::AbstractColorSet::colors_.

◆ ~DvipsColorSet()

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

Definition at line 59 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 109 of file ColorSet.h.

References bpp::AbstractColorSet::colors_.

◆ 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 116 of file ColorSet.h.

References bpp::AbstractColorSet::colors_.

◆ getColorNames()

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

Implements bpp::ColorSet.

Definition at line 124 of file ColorSet.h.

References bpp::AbstractColorSet::colors_, and bpp::MapTools::getKeys().

◆ getNumberOfColors()

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

Implements bpp::ColorSet.

Definition at line 126 of file ColorSet.h.

References bpp::AbstractColorSet::colors_.

Member Data Documentation

◆ colors_


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