bpp-core3  3.0.0
bpp::XFigColorManager Class Reference

Color manager for the XFig format. More...

#include <Bpp/Graphics/ColorManager.h>

+ Inheritance diagram for bpp::XFigColorManager:
+ Collaboration diagram for bpp::XFigColorManager:

Public Member Functions

 XFigColorManager ()
 
virtual ~XFigColorManager ()
 
unsigned int getCode (const RGBColor &color)
 
const RGBColorgetColor (unsigned int &code) const
 
const std::vector< unsigned int > & getCodes () const
 
const std::vector< RGBColor > & getColors () const
 
size_t getNumberOfColors () const
 

Protected Attributes

unsigned int currentCode_
 
std::vector< RGBColorcolors_
 
std::vector< unsigned int > codes_
 

Detailed Description

Color manager for the XFig format.

Default colors are coded from 0 to 31. New colors may be added from code 32.

Definition at line 67 of file ColorManager.h.

Constructor & Destructor Documentation

◆ XFigColorManager()

◆ ~XFigColorManager()

virtual bpp::XFigColorManager::~XFigColorManager ( )
inlinevirtual

Definition at line 115 of file ColorManager.h.

Member Function Documentation

◆ getCode()

unsigned int bpp::XFigColorManager::getCode ( const RGBColor color)
inlinevirtual
Parameters
colorThe color to look for.
Returns
The code associated to a given color.

Implements bpp::ColorManager< unsigned int >.

Definition at line 118 of file ColorManager.h.

◆ getCodes()

const std::vector<unsigned int>& bpp::XFigColorManager::getCodes ( ) const
inlinevirtual
Returns
All valid codes.

Implements bpp::ColorManager< unsigned int >.

Definition at line 143 of file ColorManager.h.

◆ getColor()

const RGBColor& bpp::XFigColorManager::getColor ( unsigned int &  code) const
inlinevirtual
Parameters
codeThe code to look for.
Returns
The color associated to a given code.
Exceptions
exceptionif the code is not valid.

Implements bpp::ColorManager< unsigned int >.

Definition at line 132 of file ColorManager.h.

References bpp::TextTools::toString().

◆ getColors()

const std::vector<RGBColor>& bpp::XFigColorManager::getColors ( ) const
inlinevirtual
Returns
All available colors.

Implements bpp::ColorManager< unsigned int >.

Definition at line 144 of file ColorManager.h.

◆ getNumberOfColors()

size_t bpp::XFigColorManager::getNumberOfColors ( ) const
inlinevirtual
Returns
The total number of colors available.

Implements bpp::ColorManager< unsigned int >.

Definition at line 145 of file ColorManager.h.

Member Data Documentation

◆ codes_

std::vector<unsigned int> bpp::XFigColorManager::codes_
protected

Definition at line 73 of file ColorManager.h.

◆ colors_

std::vector<RGBColor> bpp::XFigColorManager::colors_
protected

Definition at line 72 of file ColorManager.h.

◆ currentCode_

unsigned int bpp::XFigColorManager::currentCode_
protected

Definition at line 71 of file ColorManager.h.


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