DGtal 1.4.0
Loading...
Searching...
No Matches
LibBoard::Board::State Struct Reference

#include <Board/Board.h>

Public Member Functions

 State ()
 
double unit (const double &x)
 
Point unit (const Point &p)
 
void unit (Shape &shape)
 

Data Fields

DGtal::Color penColor
 
DGtal::Color fillColor
 
double lineWidth
 
Shape::LineStyle lineStyle
 
Shape::LineCap lineCap
 
Shape::LineJoin lineJoin
 
Fonts::Font font
 
double fontSize
 
double unitFactor
 

Detailed Description

Current graphical state for drawings made by the drawSomething() methods.

Definition at line 940 of file Board.h.

Constructor & Destructor Documentation

◆ State()

LibBoard::Board::State::State ( )

Definition at line 90 of file Board.cpp.

91{
94 lineWidth = 0.5;
95 lineStyle = Shape::SolidStyle;
96 lineCap = Shape::ButtCap;
97 lineJoin = Shape::MiterJoin;
99 fontSize = 11.0;
100 unitFactor = 1.0;
101}
static const Color None
Definition Color.h:412
static const Color Black
Definition Color.h:413
DGtal::Color penColor
Definition Board.h:941
Shape::LineJoin lineJoin
Definition Board.h:946
Shape::LineCap lineCap
Definition Board.h:945
Fonts::Font font
Definition Board.h:947
Shape::LineStyle lineStyle
Definition Board.h:944
DGtal::Color fillColor
Definition Board.h:942

References DGtal::Color::Black, fillColor, font, fontSize, lineCap, lineJoin, lineStyle, lineWidth, DGtal::Color::None, penColor, LibBoard::Fonts::TimesRoman, and unitFactor.

Member Function Documentation

◆ unit() [1/3]

◆ unit() [2/3]

Point LibBoard::Board::State::unit ( const Point & p)
inline

Definition at line 952 of file Board.h.

952{ return Point( p.x * unitFactor, p.y * unitFactor); }
MyPointD Point

References unitFactor.

◆ unit() [3/3]

void LibBoard::Board::State::unit ( Shape & shape)
inline

Definition at line 953 of file Board.h.

953{ shape.scaleAll( unitFactor ); }

References LibBoard::Shape::scaleAll(), and unitFactor.

Field Documentation

◆ fillColor

◆ font

Fonts::Font LibBoard::Board::State::font

The font.

Definition at line 947 of file Board.h.

Referenced by LibBoard::Board::drawText(), LibBoard::Board::drawText(), LibBoard::Board::setFont(), and State().

◆ fontSize

double LibBoard::Board::State::fontSize

◆ lineCap

◆ lineJoin

◆ lineStyle

◆ lineWidth

◆ penColor

◆ unitFactor

double LibBoard::Board::State::unitFactor

The factor to be applied to arguments of the drawSomething() family.

Definition at line 949 of file Board.h.

Referenced by LibBoard::Board::operator<<(), LibBoard::Board::setUnit(), LibBoard::Board::setUnit(), State(), unit(), unit(), and unit().


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