|
DGtal
0.6.devel
|
#include <Color.h>

Public Member Functions | |
| ~Color () | |
| Color (const unsigned int aRgb, unsigned char aAlpha=255) | |
| Color (unsigned char aRedValue, unsigned char aGreenValue, unsigned char aBlueValue, unsigned char aAlphaValue=255) | |
| Color (unsigned char aGrayValue, unsigned char aAlphaValue=255) | |
| Color (const bool aValidColor=true) | |
| Color & | setRGBi (const unsigned char aRedValue, const unsigned char aGreenValue, const unsigned char aBlueValue, const unsigned char aAlphaValue) |
| void | red (const unsigned char aRedValue) |
| void | green (const unsigned char aGreenValue) |
| void | blue (const unsigned char aBlueValue) |
| void | alpha (const unsigned char aAlphaValue) |
| unsigned char | red () const |
| unsigned char | green () const |
| unsigned char | blue () const |
| unsigned char | alpha () const |
| bool | valid () const |
| void | selfDisplay (std::ostream &out) const |
| bool | isValid () const |
| Color & | setRGBf (float red, float green, float blue, float alpha=1.0) |
| bool | operator== (const Color &aColor) const |
| bool | operator!= (const Color &aColor) const |
| bool | operator< (const Color &aColor) const |
| void | flushPostscript (std::ostream &) const |
| std::string | svg () const |
| std::string | svgAlpha (const char *aPrefix) const |
| std::string | postscript () const |
| std::string | tikz () const |
Static Public Attributes | |
| static const Color | None |
| static const Color | Black |
| static const Color | Gray |
| static const Color | White |
| static const Color | Red |
| static const Color | Green |
| static const Color | Lime |
| static const Color | Blue |
| static const Color | Cyan |
| static const Color | Magenta |
| static const Color | Yellow |
| static const Color | Silver |
| static const Color | Purple |
| static const Color | Navy |
| static const Color | Aqua |
Private Attributes | |
| int | myRed |
| int | myGreen |
| int | myBlue |
| int | myAlpha |
Structure representing an RGB triple.
Description of class 'Color'
| DGtal::Color::Color | ( | const unsigned int | aRgb, |
| unsigned char | aAlpha = 255 |
||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 95 of file Color.ih.
Referenced by DGtal::Display3D::addLine(), DGtal::Display3D::addPoint(), DGtal::Display3D::addPolygon(), DGtal::Display3D::addQuad(), DGtal::Display3D::addTriangle(), DGtal::Display3D::addVoxel(), and DGtal::MeshWriter< TPoint >::export2OFF().
|
inline |
|
inline |
Definition at line 89 of file Color.ih.
Referenced by DGtal::Display3D::addLine(), DGtal::Display3D::addPoint(), DGtal::Display3D::addPolygon(), DGtal::Display3D::addQuad(), DGtal::Display3D::addTriangle(), DGtal::Display3D::addVoxel(), DGtal::Display2DFactory::drawImage(), DGtal::Display2DFactory::drawImageRecursive(), DGtal::MeshWriter< TPoint >::export2OFF(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM3D(), DGtal::ColorBrightnessColorMap< PValue, PDefaultColor >::getColor(), DGtal::GradientColorMap< PValue, PDefaultPreset, PDefaultFirstColor, PDefaultLastColor >::getColor(), DGtal::BasicColorToScalarFunctors::BlueChannel::operator()(), and DGtal::BasicColorToScalarFunctors::MeanChannels::operator()().
|
inline |
| void DGtal::Color::flushPostscript | ( | std::ostream & | stream | ) | const |
|
inline |
Definition at line 83 of file Color.ih.
Referenced by DGtal::Display3D::addLine(), DGtal::Display3D::addPoint(), DGtal::Display3D::addPolygon(), DGtal::Display3D::addQuad(), DGtal::Display3D::addTriangle(), DGtal::Display3D::addVoxel(), DGtal::Display2DFactory::drawImage(), DGtal::Display2DFactory::drawImageRecursive(), DGtal::MeshWriter< TPoint >::export2OFF(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM3D(), DGtal::ColorBrightnessColorMap< PValue, PDefaultColor >::getColor(), DGtal::GradientColorMap< PValue, PDefaultPreset, PDefaultFirstColor, PDefaultLastColor >::getColor(), DGtal::BasicColorToScalarFunctors::GreenChannel::operator()(), and DGtal::BasicColorToScalarFunctors::MeanChannels::operator()().
|
inline |
| bool DGtal::Color::isValid | ( | ) | const |
| bool DGtal::Color::operator!= | ( | const Color & | aColor | ) | const |
| bool DGtal::Color::operator== | ( | const Color & | aColor | ) | const |
| string DGtal::Color::postscript | ( | ) | const |
Definition at line 121 of file Color.cpp.
References secured_sprintf.
|
inline |
Definition at line 77 of file Color.ih.
Referenced by DGtal::Display3D::addLine(), DGtal::Display3D::addPoint(), DGtal::Display3D::addPolygon(), DGtal::Display3D::addQuad(), DGtal::Display3D::addTriangle(), DGtal::Display3D::addVoxel(), DGtal::Display2DFactory::drawImage(), DGtal::Display2DFactory::drawImageRecursive(), DGtal::MeshWriter< TPoint >::export2OFF(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM(), DGtal::PPMWriter< TImage, TFunctor >::exportPPM3D(), DGtal::ColorBrightnessColorMap< PValue, PDefaultColor >::getColor(), DGtal::GradientColorMap< PValue, PDefaultPreset, PDefaultFirstColor, PDefaultLastColor >::getColor(), DGtal::BasicColorToScalarFunctors::RedChannel::operator()(), and DGtal::BasicColorToScalarFunctors::MeanChannels::operator()().
|
inline |
| void DGtal::Color::selfDisplay | ( | std::ostream & | out | ) | const |
| Color & DGtal::Color::setRGBf | ( | float | red, |
| float | green, | ||
| float | blue, | ||
| float | alpha = 1.0 |
||
| ) |
Definition at line 54 of file Color.cpp.
|
inline |
| string DGtal::Color::svg | ( | ) | const |
Definition at line 129 of file Color.cpp.
References None, and secured_sprintf.
| string DGtal::Color::svgAlpha | ( | const char * | aPrefix | ) | const |
Return a an SVG parameter string for the opacity value.
| prefix | A prefix string to be appended to the returned string if not empty. |
Definition at line 138 of file Color.cpp.
References None, and secured_sprintf.
| string DGtal::Color::tikz | ( | ) | const |
Return a string representation of the color usable in TikZ commands. Use the corresponding named color (or a mixture of a named color and black) for predefined colors. Use a mixture of red, green and blue for general colors.
Definition at line 147 of file Color.cpp.
References Black, Blue, Gray, Green, Lime, Navy, None, Purple, Red, secured_sprintf, Silver, and White.
|
inline |
|
static |
Definition at line 200 of file Color.h.
Referenced by DGtal::Display2DFactory::draw(), DGtal::DefaultDrawStylePoints_ArithmeticalDSS::setStyle(), DGtal::DefaultDrawStyleGrid_PointVector::setStyle(), and tikz().
|
static |
Definition at line 206 of file Color.h.
Referenced by DGtal::Display2DFactory::draw(), and tikz().
|
static |
Definition at line 204 of file Color.h.
Referenced by DGtal::Display2DFactory::draw(), and tikz().
|
private |
The opacity.
Definition at line 240 of file Color.h.
Referenced by operator!=(), operator<(), operator==(), and setRGBi().
|
private |
The blue component.
Definition at line 239 of file Color.h.
Referenced by Color(), operator!=(), operator<(), operator==(), and setRGBi().
|
private |
The green component.
Definition at line 238 of file Color.h.
Referenced by Color(), operator!=(), operator<(), operator==(), and setRGBi().
|
private |
Copy constructor.
| other | the object to clone. Forbidden by default. Assignment. |
| other | the object to copy. |
Definition at line 237 of file Color.h.
Referenced by Color(), operator!=(), operator<(), operator==(), and setRGBi().
|
static |
Definition at line 199 of file Color.h.
Referenced by DGtal::DefaultDrawStyleBB_ArithmeticalDSS::setStyle(), DGtal::DefaultDrawStylePoints_ArithmeticalDSS::setStyle(), DGtal::DefaultDrawStyle_FP::setStyle(), DGtal::DefaultDrawStyleGrid_FreemanChain::setStyle(), DGtal::DefaultDrawStyleInterGrid_FreemanChain::setStyle(), DGtal::DefaultDrawStyle_GeometricalDSS::setStyle(), DGtal::DefaultDrawStyle_GeometricalDCA::setStyle(), DGtal::DefaultDrawStyle_FrechetShortcut::setStyle(), DGtal::DefaultDrawStyleTransparent_LatticePolytope2D::setStyle(), svg(), svgAlpha(), tikz(), and valid().
|
static |
|
static |
Definition at line 203 of file Color.h.
Referenced by DGtal::DefaultDrawStyleBB_ArithmeticalDSS::setStyle(), DGtal::DefaultDrawStyle_FP::setStyle(), DGtal::DefaultDrawStyle_GeometricalDSS::setStyle(), DGtal::DefaultDrawStyle_GeometricalDCA::setStyle(), DGtal::DefaultDrawStyle_FrechetShortcut::setStyle(), and tikz().
|
static |
|
static |
Definition at line 202 of file Color.h.
Referenced by DGtal::MeshFromPoints< TPoint >::MeshFromPoints(), and tikz().
1.8.1.1