DGtal  0.9.4beta
Public Member Functions | Data Fields
DGtal::CustomColors Struct Reference

#include <DGtal/io/boards/Board2D.h>

Inheritance diagram for DGtal::CustomColors:
[legend]
Collaboration diagram for DGtal::CustomColors:
[legend]

Public Member Functions

 CustomColors (const Color &penColor, const Color &fillColor)
 
virtual void setStyle (Board2D &aboard) const
 
- Public Member Functions inherited from DGtal::DrawableWithBoard2D
virtual ~DrawableWithBoard2D ()
 

Data Fields

Color myPenColor
 
Color myFillColor
 

Detailed Description

Custom style class redefining the pen color and the fill color. You may use Board2D::Color::None for transparent color.

Board2D board;
board << CustomColors( Board2D::Color::Red, Board2D::Color::None );
...
See also
Board2D
Examples:
arithmetic/lower-integer-convex-hull.cpp, geometry/curves/exampleAlphaThickSegment.cpp, geometry/curves/exampleAlphaThickSegmentNoisy.cpp, geometry/curves/exampleArithmeticalDSS.cpp, geometry/surfaces/dvcm-2d-curvature.cpp, geometry/volumes/distance/distancetransform2D.cpp, geometry/volumes/distance/toricdomainvolumetric.cpp, geometry/volumes/distance/voronoimap2D.cpp, geometry/volumes/dvcm-2d.cpp, graph/graphTraversal.cpp, io/boards/dgtalBoard2D-3-custom-classes.cpp, io/boards/dgtalBoard2D-4-colormaps.cpp, topology/ctopo-1.cpp, topology/ctopo-2.cpp, topology/ctopo-fillContours.cpp, topology/cubical-complex-illustrations.cpp, topology/digitalSetToCubicalComplexes2D.cpp, topology/generateSimplicityTables2D.cpp, and tutorial-examples/freemanChainFromImage.cpp.

Definition at line 278 of file Board2D.h.

Constructor & Destructor Documentation

DGtal::CustomColors::CustomColors ( const Color penColor,
const Color fillColor 
)
inline

Constructor.

Parameters
penColorspecifies the pen color.
fillColorspecifies the fill color.

Definition at line 289 of file Board2D.h.

291  : myPenColor( penColor ), myFillColor( fillColor )
292  {}

Member Function Documentation

virtual void DGtal::CustomColors::setStyle ( Board2D ) const
inlinevirtual

Operation to override. Does nothing by default.

Reimplemented from DGtal::DrawableWithBoard2D.

Definition at line 294 of file Board2D.h.

References LibBoard::Board::setFillColor(), and LibBoard::Board::setPenColor().

295  {
296  aboard.setFillColor( myFillColor);
297  aboard.setPenColor( myPenColor );
298  }

Field Documentation

Color DGtal::CustomColors::myFillColor

Definition at line 281 of file Board2D.h.

Color DGtal::CustomColors::myPenColor

Definition at line 280 of file Board2D.h.


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