DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Data Fields
DGtal::CustomColors Struct Reference

#include <Board2D.h>

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

Public Member Functions

 CustomColors (const Color &penColor, const Color &fillColor)
virtual void setStyle (Board2D &aboard) const

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, io/boards/dgtalBoard2D-3-custom-classes.cpp, io/boards/dgtalBoard2D-4-colormaps.cpp, topology/ctopo-1.cpp, and topology/ctopo-2.cpp.

Definition at line 291 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 302 of file Board2D.h.

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

Member Function Documentation

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

Operation to override. Does nothing by default.

Parameters:
boardany object of type Board.

Reimplemented from DGtal::DrawableWithBoard2D.

Definition at line 307 of file Board2D.h.

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

{
aboard.setFillColor( myFillColor);
aboard.setPenColor( myPenColor );
}

Field Documentation

Color DGtal::CustomColors::myFillColor

Definition at line 294 of file Board2D.h.

Referenced by setStyle().

Color DGtal::CustomColors::myPenColor

Definition at line 293 of file Board2D.h.

Referenced by setStyle().


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