DGtal  1.1.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
DGtal::Color Class Reference

Structure representing an RGB triple with alpha component. More...

#include <DGtal/io/Color.h>

Collaboration diagram for DGtal::Color:
[legend]

Public Member Functions

 ~Color ()
 
 Color (const unsigned int aRgb, unsigned char aAlpha=255)
 
 Color (const Color &aColor)
 
 Color (const unsigned char aRedValue, const unsigned char aGreenValue, const unsigned char aBlueValue, const unsigned char aAlphaValue=255)
 
 Color (unsigned char aGrayValue, unsigned char aAlphaValue=255)
 
 Color ()
 
ColorsetRGBi (const unsigned char aRedValue, const unsigned char aGreenValue, const unsigned char aBlueValue, const unsigned char aAlphaValue)
 
ColorsetRGBA (DGtal::uint32_t aRGBA)
 
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
 
double r () const
 
double g () const
 
double b () const
 
double a () const
 
DGtal::uint32_t getRGB () const
 
DGtal::uint32_t getRGBA () const
 
bool valid () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
ColorsetRGBf (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
 
Coloroperator+= (const Color &v)
 
Color operator+ (const Color &v) const
 
Coloroperator-= (const Color &v)
 
Color operator- (const Color &v) const
 
Coloroperator*= (const double coeff)
 
Color operator* (const double coeff) const
 
Coloroperator= (const Color &pv)
 
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 Member Functions

unsigned char clamp (const double value) const
 

Private Attributes

unsigned char myRed
 
unsigned char myGreen
 
unsigned char myBlue
 
unsigned char myAlpha
 

Detailed Description

Structure representing an RGB triple with alpha component.

Description of class 'Color'

Note
if compilation flag COLOR_WITH_ALPHA_ARITH is set, then the arithmetical operations on colors also consider the alpha-channel. Otherwise, the alpha channel is not changed when summing up to colors for instance.
Examples
dec/exampleDiscreteExteriorCalculusSolve.cpp, examples/tutorial-examples/polyhedralizer.cpp, geometry/curves/exampleAlphaThickSegment.cpp, geometry/curves/exampleAlphaThickSegmentTgtCover.cpp, geometry/curves/exampleArithmeticalDSS.cpp, geometry/curves/exampleGridCurve3d-2.cpp, geometry/curves/exampleRationalConvexity.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, geometry/volumes/distance/distancetransform3D.cpp, geometry/volumes/distance/exampleFMM3D.cpp, geometry/volumes/distance/voronoimap2D.cpp, geometry/volumes/dvcm-2d.cpp, graph/graphTraversal.cpp, graph/volDistanceTraversal.cpp, io/boards/dgtalBoard2D-3-custom-classes.cpp, io/boards/dgtalBoard2D-3-custom-points.cpp, io/boards/dgtalBoard2D-4-colormaps.cpp, io/boards/dgtalBoard3D-1-points.cpp, io/boards/dgtalBoard3D-6-clipping.cpp, io/boards/dgtalBoard3DTo2D-3-objects.cpp, io/boards/dgtalBoard3DTo2D-5-custom.cpp, io/boards/dgtalBoard3DTo2D-6.cpp, io/boards/logoDGtal.cpp, io/digitalSetFromPointList.cpp, io/meshFromOFF.cpp, io/viewDualSurface.cpp, io/viewers/viewer3D-3-objects.cpp, io/viewers/viewer3D-5-custom.cpp, io/viewers/viewer3D-6-clipping.cpp, io/viewers/viewer3D-7-planes.cpp, io/viewers/viewer3D-7-stdplane.cpp, io/viewers/viewer3D-7bis-planes.cpp, io/viewers/viewer3D-7bis-stdplane.cpp, io/viewers/viewer3D-8-2DSliceImages.cpp, io/viewers/viewer3D-9-3Dimages.cpp, shapes/exampleEuclideanShapesDecorator.cpp, shapes/mesh3DConstructionAndVisualisation.cpp, shapes/viewMarchingCubes.cpp, shapes/viewPolygonalMarchingCubes.cpp, topology/3dBorderExtraction.cpp, topology/3dKSSurfaceExtraction.cpp, topology/ctopo-1.cpp, topology/ctopo-2-3d.cpp, topology/ctopo-2.cpp, topology/ctopo-fillContours.cpp, topology/cubical-complex-illustrations.cpp, topology/digitalSetToCubicalComplexes2D.cpp, topology/digitalSurfaceSlice.cpp, topology/frontierAndBoundary.cpp, topology/generateSimplicityTables2D.cpp, topology/homotopicThinning3D.cpp, topology/khalimskySpaceScanner.cpp, topology/volBreadthFirstTraversal.cpp, topology/volScanBoundary.cpp, topology/volTrackBoundary.cpp, tutorial-examples/freemanChainFromImage.cpp, tutorial-examples/polyhedralizer.cpp, and tutorial-examples/volDTGranulo.cpp.

Definition at line 66 of file Color.h.

Constructor & Destructor Documentation

◆ ~Color()

DGtal::Color::~Color ( )

Destructor.

Definition at line 186 of file Color.cpp.

187 {
188 }

◆ Color() [1/5]

DGtal::Color::Color ( const unsigned int  aRgb,
unsigned char  aAlpha = 255 
)

Constructor.

Parameters
aRgban unsigned int representing the color.
aAlphacolor transparency (default value =255);

Definition at line 44 of file Color.cpp.

45  :myAlpha( aAlphaValue )
46 {
47  myRed = ( rgb & 0xFF0000u ) >> 16;
48  myGreen = ( rgb & 0xFF00u ) >> 8;
49  myBlue = rgb & 0xFF;
50 }

References myBlue, myGreen, and myRed.

◆ Color() [2/5]

DGtal::Color::Color ( const Color aColor)
inline

Copy Constructor.

Parameters
aColorthe color to copy.

Definition at line 95 of file Color.h.

95  :
96  myRed(aColor.myRed),myGreen(aColor.myGreen),
97  myBlue(aColor.myBlue), myAlpha(aColor.myAlpha)
98  {}

◆ Color() [3/5]

DGtal::Color::Color ( const unsigned char  aRedValue,
const unsigned char  aGreenValue,
const unsigned char  aBlueValue,
const unsigned char  aAlphaValue = 255 
)
inline

Constructor from R, G, B and Alpha parameter.

Parameters
aRedValuered component
aGreenValuegreen component
aBlueValueblue component
aAlphaValuecolor transparency.

Definition at line 110 of file Color.h.

114  : myRed(aRedValue),myGreen(aGreenValue),myBlue(aBlueValue),myAlpha(aAlphaValue) { }

◆ Color() [4/5]

DGtal::Color::Color ( unsigned char  aGrayValue,
unsigned char  aAlphaValue = 255 
)
inline

Constructor from gray scale value.

Parameters
aGrayValuethe color gray value.
aAlphaValuecolor transparency (default value =255);.

Definition at line 124 of file Color.h.

126  : myRed(aGrayValue),myGreen(aGrayValue), myBlue(aGrayValue), myAlpha(aAlphaValue) { }

◆ Color() [5/5]

DGtal::Color::Color ( )
inline

Default Constructor.

Definition at line 134 of file Color.h.

135  : myRed(0),myGreen(0),myBlue(0), myAlpha(255)
136  {
137  }

Member Function Documentation

◆ a()

double DGtal::Color::a ( ) const

◆ alpha() [1/2]

unsigned char DGtal::Color::alpha ( ) const

◆ alpha() [2/2]

void DGtal::Color::alpha ( const unsigned char  aAlphaValue)

◆ b()

double DGtal::Color::b ( ) const

◆ blue() [1/2]

unsigned char DGtal::Color::blue ( ) const

◆ blue() [2/2]

void DGtal::Color::blue ( const unsigned char  aBlueValue)

◆ clamp()

unsigned char DGtal::Color::clamp ( const double  value) const
inlineprivate

Clamp an int to [0,255]

Parameters
[in]valuethe value to clamp
Returns
the clamped value

Definition at line 433 of file Color.h.

434  {
435  return static_cast<unsigned char>(std::max( std::min(value, 255.0), 0.0));
436  }

References max().

Referenced by operator*(), operator*=(), operator+(), operator+=(), operator-(), and operator-=().

◆ flushPostscript()

void DGtal::Color::flushPostscript ( std::ostream &  stream) const

Definition at line 124 of file Color.cpp.

125 {
126  stream << ((double)myRed/255.0) << " "
127  << ((double)myGreen/255.0) << " "
128  << ((double)myBlue/255.0) << " srgb\n";
129 }

Referenced by LibBoard::Polyline::flushPostscript(), LibBoard::QuadraticBezierCurve::flushPostscript(), and LibBoard::Arc::flushPostscript().

◆ g()

double DGtal::Color::g ( ) const

◆ getRGB()

DGtal::uint32_t DGtal::Color::getRGB ( ) const
Returns
the unsigned integer ( DGtal::uint32_t ) coding each R, G, B canal on 8 bits starting from least significant bit.

Referenced by DGtal::functors::ColorRGBEncoder< TValue >::operator()().

◆ getRGBA()

DGtal::uint32_t DGtal::Color::getRGBA ( ) const
Returns
the unsigned integer ( DGtal::uint32_t ) coding each R, G, B, A canal on 8 bits starting from least significant bit.

◆ green() [1/2]

unsigned char DGtal::Color::green ( ) const

◆ green() [2/2]

void DGtal::Color::green ( const unsigned char  aGreenValue)

◆ isValid()

bool DGtal::Color::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

Definition at line 227 of file Color.cpp.

228 {
229  return true;
230 }

◆ operator!=()

bool DGtal::Color::operator!= ( const Color aColor) const

Definition at line 96 of file Color.cpp.

97 {
98  return myRed != aColor.myRed
99  || myGreen != aColor.myGreen
100  || myBlue != aColor.myBlue
101  || myAlpha != aColor.myAlpha;
102 }

References myAlpha, myBlue, myGreen, and myRed.

◆ operator*()

Color DGtal::Color::operator* ( const double  coeff) const
inline

Multiplication by a scalar (component-wise)

Note
returned components are clamped to [0,255] interval.
Parameters
coeffthe scalar.
Returns
a scaled color

Definition at line 339 of file Color.h.

340  {
341  Color c;
342  c.myRed = clamp((double)this->myRed*coeff);
343  c.myBlue = clamp((double)this->myBlue*coeff);
344  c.myGreen = clamp((double)this->myGreen*coeff);
345 #ifdef COLOR_WITH_ALPHA_ARITH
346  c.myAlpha = clamp((double)this->myAlpha*coeff);
347 #else
348  c.myAlpha = this->myAlpha;
349 #endif
350  return c;
351  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator*=()

Color& DGtal::Color::operator*= ( const double  coeff)
inline

Multiplication by a scalar (component-wise)

Note
returned components are clamped to [0,255] interval.
Parameters
coeffthe scalar
Returns
the scaled color

Definition at line 320 of file Color.h.

321  {
322  this->myRed = clamp((double)this->myRed*coeff);
323  this->myBlue = clamp((double)this->myBlue*coeff);
324  this->myGreen = clamp((double)this->myGreen*coeff);
325 #ifdef COLOR_WITH_ALPHA_ARITH
326  this->myAlpha = clamp((double)this->myAlpha*coeff);
327 #endif
328  return *this;
329  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator+()

Color DGtal::Color::operator+ ( const Color v) const
inline

Addition operator.

Note
returned components are clamped to [0,255] interval.
Parameters
vis the Color that gets added to *this.
Returns
a new Point that is the addition of 'this' to [v].

Definition at line 254 of file Color.h.

255  {
256  Color c;
257  c.myRed = clamp((int)this->myRed + (int)v.myRed);
258  c.myBlue =clamp((int)this->myBlue + (int)v.myBlue);
259  c.myGreen = clamp((int)this->myGreen + (int)v.myGreen);
260 #ifdef COLOR_WITH_ALPHA_ARITH
261  c.myAlpha = clamp((int)this->myAlpha + (int)v.myAlpha);
262 #else
263  c.myAlpha = this->myAlpha ;
264 #endif
265  return c;
266  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator+=()

Color& DGtal::Color::operator+= ( const Color v)
inline

Addition operator with assignement.

Note
returned components are clamped to [0,255] interval.
Parameters
vis the Color that gets added to *this.
Returns
a reference on 'this'.

Definition at line 234 of file Color.h.

235  {
236  this->myRed = clamp((int)this->myRed + (int)v.myRed);
237  this->myBlue = clamp((int)this->myBlue + (int)v.myBlue);
238  this->myGreen = clamp((int)this->myGreen + (int)v.myGreen);
239 #ifdef COLOR_WITH_ALPHA_ARITH
240  this->myAlpha = clamp((int)this->myAlpha + (int)v.myAlpha);
241 #endif
242  return *this;
243  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator-()

Color DGtal::Color::operator- ( const Color v) const
inline

Substraction operator.

Note
returned components are clamped to [0,255] interval.
Parameters
vis the Color that gets substacted to *this.
Returns
a new Point that is the subtraction 'this'-[v].

Definition at line 296 of file Color.h.

297  {
298  Color c;
299  c.myRed = clamp((int)this->myRed - (int)v.myRed);
300  c.myBlue = clamp((int)this->myBlue - (int)v.myBlue);
301  c.myGreen = clamp((int)this->myGreen - (int)v.myGreen);
302 #ifdef COLOR_WITH_ALPHA_ARITH
303  c.myAlpha = clamp((int)this->myAlpha - (int)v.myAlpha);
304 #else
305  c.myAlpha = this->myAlpha ;
306 #endif
307  return c;
308  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator-=()

Color& DGtal::Color::operator-= ( const Color v)
inline

Substraction operator with assignement.

Note
returned components are clamped to [0,255] interval.
Parameters
vis the Point that gets substracted to *this.
Returns
a reference on 'this'.

Definition at line 277 of file Color.h.

278  {
279  this->myRed = clamp((int)this->myRed - (int)v.myRed);
280  this->myBlue = clamp((int)this->myBlue - (int)v.myBlue);
281  this->myGreen = clamp((int)this->myGreen - (int)v.myGreen);
282 #ifdef COLOR_WITH_ALPHA_ARITH
283  this->myAlpha = clamp((int)this->myAlpha - (int)v.myAlpha);
284 #endif
285  return *this;
286  }

References clamp(), myAlpha, myBlue, myGreen, and myRed.

◆ operator<()

bool DGtal::Color::operator< ( const Color aColor) const

Definition at line 104 of file Color.cpp.

106 {
107  if ( myRed < aColor.myRed )
108  return true;
109  if ( myRed == aColor.myRed ) {
110  if ( myGreen < aColor.myGreen )
111  return true;
112  if ( myGreen == aColor.myGreen ) {
113  if ( myBlue < aColor.myBlue )
114  return true;
115  if ( myBlue == aColor.myBlue )
116  return myAlpha < aColor.myAlpha;
117  }
118  }
119  return false;
120 }

References myAlpha, myBlue, myGreen, and myRed.

◆ operator=()

Color& DGtal::Color::operator= ( const Color pv)
inline

Assignement Operator

Parameters
pvthe object to copy.
Returns
a reference on 'this'.

Definition at line 359 of file Color.h.

360  {
361  this->myRed = pv.myRed;
362  this->myGreen = pv.myGreen;
363  this->myBlue = pv.myBlue;
364  this->myAlpha = pv.myAlpha;
365  return *this;
366  }

References myAlpha, myBlue, myGreen, and myRed.

◆ operator==()

bool DGtal::Color::operator== ( const Color aColor) const

Definition at line 87 of file Color.cpp.

88 {
89  return myRed == aColor.myRed
90  && myGreen == aColor.myGreen
91  && myBlue == aColor.myBlue
92  && myAlpha == aColor.myAlpha;
93 }

References myAlpha, myBlue, myGreen, and myRed.

◆ postscript()

string DGtal::Color::postscript ( ) const

Definition at line 132 of file Color.cpp.

133 {
134  char buffer[255];
135  secured_sprintf( buffer, 255, "%.4f %.4f %.4f", myRed/255.0, myGreen/255.0, myBlue/255.0 );
136  return buffer;
137 }

Referenced by LibBoard::Dot::flushPostscript(), LibBoard::Line::flushPostscript(), LibBoard::Arrow::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Arc::flushPostscript(), and LibBoard::Text::flushPostscript().

◆ r()

double DGtal::Color::r ( ) const

◆ red() [1/2]

unsigned char DGtal::Color::red ( ) const

◆ red() [2/2]

void DGtal::Color::red ( const unsigned char  aRedValue)

◆ selfDisplay()

void DGtal::Color::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Definition at line 217 of file Color.cpp.

218 {
219  out << "[Color] RGBA("<<(int)myRed<<","<<(int)myGreen<<","<<(int)myBlue<<","<<(int)myAlpha<<")";
220 }

◆ setRGBA()

DGtal::Color & DGtal::Color::setRGBA ( DGtal::uint32_t  aRGBA)

Set the color parameter from an unsigned integer coding each canal.

Parameters
aRGBAan unsigned integer on 32 bits(DGtal::unit32_t) representing the color coded with 4 bits on each components R, G, B and Alpha value.
Returns
a reference on the itself.

Definition at line 54 of file Color.cpp.

55 {
56  myRed = ( aRGBA & 0xFF000000u ) >> 24;
57  myGreen = ( aRGBA & 0xFF0000u ) >> 16;
58  myBlue = ( aRGBA & 0xFF00u ) >> 8;
59  myAlpha = aRGBA & 0xFF;
60  return *this;
61 }

◆ setRGBf()

DGtal::Color & DGtal::Color::setRGBf ( float  red,
float  green,
float  blue,
float  alpha = 1.0 
)

Definition at line 65 of file Color.cpp.

68  {
69  if ( aRedValue > 1.0f ) aRedValue = 1.0f;
70  if ( aRedValue < 0.0f ) aRedValue = 0.0f;
71  myRed = static_cast<unsigned char>( 255 * aRedValue );
72  if ( aGreenValue > 1.0f ) aGreenValue = 1.0f;
73  if ( aGreenValue < 0.0f ) aGreenValue = 0.0f;
74  myGreen = static_cast<unsigned char>( 255 * aGreenValue );
75  if ( aBlueValue > 1.0f ) aBlueValue = 1.0f;
76  if ( aBlueValue < 0.0f ) aBlueValue = 0.0f;
77  myBlue = static_cast<unsigned char>( 255 * aBlueValue );
78  if ( aAlphaValue > 1.0f ) aAlphaValue = 1.0f;
79  if ( aAlphaValue < 0.0f ) aAlphaValue = 0.0f;
80  myAlpha = static_cast<unsigned char>( 255 * aAlphaValue );
81  return *this;
82 }

Referenced by LibBoard::Board::setFillColorRGBf(), and LibBoard::Board::setPenColorRGBf().

◆ setRGBi()

Color& DGtal::Color::setRGBi ( const unsigned char  aRedValue,
const unsigned char  aGreenValue,
const unsigned char  aBlueValue,
const unsigned char  aAlphaValue 
)

◆ svg()

string DGtal::Color::svg ( ) const

Definition at line 140 of file Color.cpp.

141 {
142  char buffer[255];
143  if ( *this == DGtal::Color::None ) return "none";
144  secured_sprintf( buffer, 255, "rgb(%d,%d,%d)",myRed, myGreen, myBlue );
145  return buffer;
146 }

References None.

Referenced by LibBoard::Arrow::flushSVG(), LibBoard::Text::flushSVG(), and LibBoard::Shape::svgProperties().

◆ svgAlpha()

string DGtal::Color::svgAlpha ( const char *  aPrefix) const

Return a an SVG parameter string for the opacity value.

Parameters
aPrefixA prefix string to be appended to the returned string if not empty.
Returns
An empty string if alpha == 255, otherwise the string <prefix>-opacity="<alpha-value>".

Definition at line 149 of file Color.cpp.

150 {
151  char buffer[255];
152  if ( myAlpha == 255 || *this == DGtal::Color::None ) return "";
153  secured_sprintf( buffer, 255, " %s-opacity=\"%f\"", prefix, myAlpha/255.0f );
154  return buffer;
155 }

References None.

Referenced by LibBoard::Arrow::flushSVG(), LibBoard::Text::flushSVG(), and LibBoard::Shape::svgProperties().

◆ tikz()

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.

Returns
a string representation of the color usable in TikZ commands.

Definition at line 158 of file Color.cpp.

159 {
160  // see tex/generic/pgf/utilities/pgfutil-plain.def for color definitions
161  char buffer[255];
162  if ( *this == DGtal::Color::None ) return "none";
163  if ( *this == DGtal::Color::Black ) return "black";
164  if ( *this == DGtal::Color::Gray ) return "gray";
165  if ( *this == DGtal::Color::White ) return "white";
166  if ( *this == DGtal::Color::Red ) return "red";
167  if ( *this == DGtal::Color::Green ) return "green!50!black";
168  if ( *this == DGtal::Color::Lime ) return "green";
169  if ( *this == DGtal::Color::Blue ) return "blue";
170 // if ( *this == DGtal::Color::Cyan ) return "cyan";
171 // if ( *this == DGtal::Color::Magenta ) return "magenta";
172 // if ( *this == DGtal::Color::Yellow ) return "yellow";
173  if ( *this == DGtal::Color::Silver ) return "white!75!black";
174  if ( *this == DGtal::Color::Purple ) return "gray"; // ???: Is Color::Purple meant to be equal to Color::Gray?
175  if ( *this == DGtal::Color::Navy ) return "blue!50!black";
176 // if ( *this == DGtal::Color::Aqua ) return "cyan"; // ???: Is Color::Aqua meant to be equal to Color::Cyan?
177  secured_sprintf( buffer, 255, "{rgb,255:red,%d;green,%d;blue,%d}", myRed, myGreen, myBlue );
178  return buffer;
179 }

References Black, Blue, Gray, Green, Lime, Navy, None, Purple, Red, Silver, and White.

Referenced by LibBoard::Shape::tikzProperties().

◆ valid()

bool DGtal::Color::valid ( ) const

Field Documentation

◆ Aqua

const DGtal::Color DGtal::Color::Aqua
static

Definition at line 410 of file Color.h.

◆ Black

const DGtal::Color DGtal::Color::Black
static

◆ Blue

const DGtal::Color DGtal::Color::Blue
static

◆ Cyan

const DGtal::Color DGtal::Color::Cyan
static

Definition at line 404 of file Color.h.

◆ Gray

const DGtal::Color DGtal::Color::Gray
static

◆ Green

const DGtal::Color DGtal::Color::Green
static

◆ Lime

const DGtal::Color DGtal::Color::Lime
static

Definition at line 402 of file Color.h.

Referenced by tikz().

◆ Magenta

const DGtal::Color DGtal::Color::Magenta
static

Definition at line 405 of file Color.h.

Referenced by testAlphaThickSegmentConvexHullAndBox().

◆ myAlpha

unsigned char DGtal::Color::myAlpha
private

◆ myBlue

unsigned char DGtal::Color::myBlue
private

The blue component.

Definition at line 418 of file Color.h.

Referenced by Color(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<(), operator=(), and operator==().

◆ myGreen

unsigned char DGtal::Color::myGreen
private

The green component.

Definition at line 417 of file Color.h.

Referenced by Color(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<(), operator=(), and operator==().

◆ myRed

unsigned char DGtal::Color::myRed
private

The red component.

Definition at line 416 of file Color.h.

Referenced by Color(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator<(), operator=(), and operator==().

◆ Navy

const DGtal::Color DGtal::Color::Navy
static

Definition at line 409 of file Color.h.

Referenced by tikz().

◆ None

const DGtal::Color DGtal::Color::None
static

◆ Purple

const DGtal::Color DGtal::Color::Purple
static

Definition at line 408 of file Color.h.

Referenced by testAlphaThickSegmentConvexHullAndBox(), testThicknessDefinitions(), and tikz().

◆ Red

const DGtal::Color DGtal::Color::Red
static

◆ Silver

const DGtal::Color DGtal::Color::Silver
static

Definition at line 407 of file Color.h.

Referenced by tikz().

◆ White

const DGtal::Color DGtal::Color::White
static

Definition at line 399 of file Color.h.

Referenced by testMesh(), and tikz().

◆ Yellow

const DGtal::Color DGtal::Color::Yellow
static

The documentation for this class was generated from the following files:
DGtal::Color::Lime
static const Color Lime
Definition: Color.h:402
max
int max(int a, int b)
Definition: testArithmeticalDSS.cpp:1108
DGtal::Color::Green
static const Color Green
Definition: Color.h:401
DGtal::Color::myBlue
unsigned char myBlue
Definition: Color.h:418
DGtal::Color::myAlpha
unsigned char myAlpha
Definition: Color.h:419
DGtal::Color::Black
static const Color Black
Definition: Color.h:397
DGtal::Color::Blue
static const Color Blue
Definition: Color.h:403
DGtal::Color::Gray
static const Color Gray
Definition: Color.h:398
DGtal::Color::Purple
static const Color Purple
Definition: Color.h:408
DGtal::Color::Navy
static const Color Navy
Definition: Color.h:409
DGtal::Color::White
static const Color White
Definition: Color.h:399
DGtal::Color::Red
static const Color Red
Definition: Color.h:400
DGtal::Color::clamp
unsigned char clamp(const double value) const
Definition: Color.h:433
DGtal::Color::myRed
unsigned char myRed
Definition: Color.h:416
DGtal::Color::Silver
static const Color Silver
Definition: Color.h:407
DGtal::Color::Color
Color()
Definition: Color.h:134
DGtal::Color::myGreen
unsigned char myGreen
Definition: Color.h:417
DGtal::Color::None
static const Color None
Definition: Color.h:396