DGtal 2.0.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:421
static const Color Black
Definition Color.h:422
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]

double LibBoard::Board::State::unit ( const double & x)
inline

Definition at line 951 of file Board.h.

951{ return x * unitFactor; }

References unitFactor.

◆ 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, LibBoard::Point::x, and LibBoard::Point::y.

◆ 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

DGtal::Color LibBoard::Board::State::fillColor

The fill color.

Definition at line 942 of file Board.h.

Referenced by State().

◆ font

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

The font.

Definition at line 947 of file Board.h.

Referenced by State().

◆ fontSize

double LibBoard::Board::State::fontSize

The font size.

Definition at line 948 of file Board.h.

Referenced by State().

◆ lineCap

Shape::LineCap LibBoard::Board::State::lineCap

The type of line extremities.

Definition at line 945 of file Board.h.

Referenced by State().

◆ lineJoin

Shape::LineJoin LibBoard::Board::State::lineJoin

The type of line junction.

Definition at line 946 of file Board.h.

Referenced by State().

◆ lineStyle

Shape::LineStyle LibBoard::Board::State::lineStyle

The line style.

Definition at line 944 of file Board.h.

Referenced by State().

◆ lineWidth

double LibBoard::Board::State::lineWidth

The line thickness.

Definition at line 943 of file Board.h.

Referenced by State().

◆ penColor

DGtal::Color LibBoard::Board::State::penColor

The pen color.

Definition at line 941 of file Board.h.

Referenced by State().

◆ 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 State(), unit(), unit(), and unit().


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