DGtal  1.5.beta
DGtal::CustomColors Struct Reference

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

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

Inheritance 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 );
...
CustomColors(const Color &penColor, const Color &fillColor)
Definition: Board2D.h:289
See also
Board2D

Definition at line 278 of file Board2D.h.

Constructor & Destructor Documentation

◆ CustomColors()

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

◆ setStyle()

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.

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

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

Field Documentation

◆ myFillColor

Color DGtal::CustomColors::myFillColor

Definition at line 281 of file Board2D.h.

Referenced by setStyle().

◆ myPenColor

Color DGtal::CustomColors::myPenColor

Definition at line 280 of file Board2D.h.

Referenced by setStyle().


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