Board 0.9.6
Namespaces | Classes | Enumerations | Functions | Variables
LibBoard Namespace Reference

Namespaces

namespace  Fonts
 
namespace  Tools
 

Classes

struct  Arrow
 A line between two points with an arrow at one extremity. More...
 
struct  Bezier
 A Bezier curve described by two series of 2D points (curve points and control points). More...
 
struct  Board
 Class for EPS, FIG or SVG drawings. More...
 
struct  BoundingBoxExtractor
 The BoundingBoxExtractor struct may be used to compute the bounding box of a composite shape tree. More...
 
struct  BoundingBoxViewer
 The BoundingBoxViewer struct may be used to display the bounding boxes of the shapes in a composite tree. More...
 
class  Color
 Structure representing an RGB triple. More...
 
struct  CompositeShapeTransform
 A CompositeShapeTransform may be used to duplicate/transform a composite shape tree. More...
 
struct  ConstLeafVisitor
 Leaf visitor may be used to apply a function on each leaf, in back-to-front order. More...
 
struct  ConstShapeVisitor
 A ConstShapeVisitor may visit const shapes of a composite shape tree in back-to-front order. More...
 
struct  Dot
 A line between two points. More...
 
struct  Ellipse
 An ellipse. More...
 
class  Exception
 
struct  FillColorExtractor
 The fill-color extractor may be used to retrieve all fill colors. More...
 
struct  GouraudTriangle
 A triangle with shaded filling according to colors given for each vertex. More...
 
struct  Group
 A group of shapes. A group is basically a ShapeList except that when rendered in either an SVG of a FIG file, it is a true compound element. More...
 
struct  Image
 Structure for a bitmap image shape. More...
 
struct  LeafVisitor
 Leaf visitor may be used to apply a function on each leaf, in back-to-front order. More...
 
struct  Line
 A line between two points. More...
 
struct  Path
 A path, according to Postscript and SVG definition. More...
 
struct  PenColorExtractor
 The pen-color extractor may be used to retrieve all pen colors. More...
 
struct  Point
 Struct representing a 2D point. More...
 
struct  Polyline
 A polygonal line described by a series of 2D points. More...
 
struct  Rect
 Struct representing a rectangle on the plane. More...
 
struct  RoughVisitor
 
struct  Shape
 Abstract structure for a 2D shape. More...
 
struct  ShapeCounter
 The ShapeCounter struct may be used to count shapes in the composite shapes tree. More...
 
struct  ShapeList
 A group of shapes. More...
 
struct  ShapeVisitor
 A ShapeVisitor visits all shapes in a composite shape tree in back-to-front order. More...
 
struct  ShapeWithStyle
 Abstract structure for a 2D shape. More...
 
struct  ShapeWithStyleVisitor
 Leaf visitor may be used to apply a function on each Shape with style, in back-to-front order. More...
 
struct  Style
 
struct  Text
 A piece of text. More...
 
struct  Transform
 
struct  TransformEPS
 Structure representing a scaling and translation suitable for an EPS output. More...
 
struct  TransformFIG
 Structure representing a scaling and translation suitable for an XFig output. More...
 
class  TransformMatrix
 
struct  TransformSVG
 Structure representing a scaling and translation suitable for an SVG output. More...
 
struct  TransformTikZ
 Structure representing a scaling and translation suitable for an TikZ output. More...
 

Enumerations

enum class  Direction { Top , Right , Bottom , Left }
 The Direction enum. More...
 
enum  Alignment {
  Top , Bottom , Center , Left ,
  Right
}
 The Alignment enum. More...
 
enum class  PageSize {
  BoundingBox = 0 , A0 , A1 , A2 ,
  A3 , A4 , A5 , A6 ,
  A7 , A8 , A9 , A10 ,
  Letter , Legal , Executive
}
 Page sizes. More...
 
enum class  Unit { Point , Inch , Centimeter , Millimeter }
 Length units. More...
 
enum class  ColorSpecification { PenColor , FillColor }
 The ColorSpecification enum. More...
 
enum  LineCap { ButtCap = 0 , RoundCap , SquareCap }
 
enum  LineJoin { MiterJoin = 0 , RoundJoin , BevelJoin }
 
enum  LineStyle {
  SolidStyle = 0 , DashStyle , DotStyle , DashDotStyle ,
  DashDotDotStyle , DashDotDotDotStyle
}
 
enum  LineWidthFlag { IgnoreLineWidth , UseLineWidth }
 
enum  SketchFilling {
  NoFilling , PlainFilling , StraightHachure , CrossingHachure ,
  SketchyHachure , SketchyCrossingHachure
}
 

Functions

Group grid (Point topLeft, size_t columns, size_t rows, double width, double height, Color penColor, Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin)
 
Group grid (Point topLeft, size_t columns, size_t rows, double width, double height, const Style &style=Style::defaultStyle())
 
Group cross (Point p, const Style &style=Style::defaultStyle())
 
Group array (Point topLeft, const std::vector< Color > &colors, unsigned int columns, unsigned int rows, double pixelWidth, double pixelHeight=0.0, double lineWidth=0.0)
 Produce a rectangular color matrix.
 
Group framed (const Shape &shape, double margin=0.0, const Color &penColor=Style::defaultPenColor(), const Color &fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), LineStyle lineStyle=Style::defaultLineStyle(), int sketchyCount=0)
 Surround a shape with a rectangular frame.
 
Group tiling (const Shape &shape, Point topLeftCorner, int columns, int rows, double spacing=0.0, LineWidthFlag lineWidthFlag=UseLineWidth)
 
Group circled (const Shape &shape, double margin=0.0, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), LineStyle lineStyle=Style::defaultLineStyle())
 Surround a shape with a cirle.
 
Polyline bezierControls (const Bezier &bezier, const Style &style=Style::defaultStyle())
 Produce a polyline of the Biezer vertices and control points.
 
Group boardFontText (Point baselineStart, const std::string &text, double size, Color penColor=Style::defaultPenColor(), double lineWidth=0.0)
 Create a text with board's font.
 
std::ostream & operator<< (std::ostream &out, const Color &color)
 
Ellipse circle (double x, double y, double radius, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle())
 
Ellipse circle (Point center, double radius, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle())
 
Ellipse circle (Point center, double radius, Style style)
 
Path mix (const Path &a, const Path &b, double time)
 Interpolate two paths according to a time (0 is a, 1 is b)
 
Point mix (const Point &a, const Point &b, double t)
 Return an interpolated point between two points at 'time' t.
 
bool orthogonal (const Point &a, const Point &b)
 Check if two vectors are orthogonals.
 
Point operator+ (const Point &a, const Point &b)
 Compute the sum of two vectors.
 
Point operator- (const Point &a, const Point &b)
 Compute the difference between two vectors.
 
double operator* (const Point &a, const Point &b)
 Compute the scalar product of two vectors.
 
Point operator* (const Point &p, double s)
 Compute the product of a vector and a scalar.
 
Point operator* (double s, const Point &p)
 Compute the product of a vector and a scalar.
 
Point operator/ (const Point &p, double s)
 Compute the division of a vector by a scalar.
 
bool operator== (const Point &a, const Point &b)
 Check if two points are equal.
 
bool operator!= (const Point &a, const Point &b)
 Check if two points are different.
 
bool almostEqual (const Point &a, const Point &b)
 Check if two points are almost equal according to Tools::almostEqual.
 
Polyline rectangle (double left, double top, double width, double height, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle(), const LineCap cap=Style::defaultLineCap(), const LineJoin join=Style::defaultLineJoin())
 
Polyline rectangle (double left, double top, double width, double height, const Style &style)
 
Polyline rectangle (const Rect &rect, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle(), const LineCap cap=Style::defaultLineCap(), const LineJoin join=Style::defaultLineJoin())
 
Polyline rectangle (const Rect &rect, const Style &style)
 
Polyline triangle (const Point &p1, const Point &p2, const Point &p3, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle(), const LineCap cap=Style::defaultLineCap(), const LineJoin join=Style::defaultLineJoin())
 
Polyline triangle (const double x1, const double y1, const double x2, const double y2, const double x3, const double y3, Color penColor=Style::defaultPenColor(), Color fillColor=Style::defaultFillColor(), double lineWidth=Style::defaultLineWidth(), const LineStyle lineStyle=Style::defaultLineStyle(), const LineCap cap=Style::defaultLineCap(), const LineJoin join=Style::defaultLineJoin())
 
Polyline triangle (const Point &p1, const Point &p2, const Point &p3, const Style &style)
 
Polyline mix (const Polyline &a, const Polyline &b, double time)
 
Rect operator|| (const Rect &rectA, const Rect &rectB)
 
Rect operator&& (const Rect &rectA, const Rect &rectB)
 
ShapeList makeRough (const Shape &shape, int repeat=1, SketchFilling filling=PlainFilling, double hachureAngle=0.0, double hachureSpacing=0.0)
 
ShapeList hachuresLinesOrBezier (const std::vector< std::tuple< Point, Point > > &lines, Style style, SketchFilling type)
 
std::vector< std::tuple< Point, Point > > hachures (const Path &path, double spacing, double angle=0.0, bool addHorizontals=false)
 
std::vector< std::tuple< Point, Point > > hachures (const Ellipse &ellipse, double spacing, double angle=0.0)
 
ShapeList hachures (const Ellipse &ellipse, Style style, SketchFilling type, double spacing, double angle=0.0)
 
ShapeList hachures (const Path &path, Style style, SketchFilling type, double spacing, double angle=0.0, bool addHorizontals=false)
 
ShapeList hachures (const Path &path, SketchFilling type, Color color, double width, double spacing, double angle=0.0)
 
std::ostream & operator<< (std::ostream &out, const Style &style)
 

Variables

const char * PSFontNames []
 
const char * xFigDashStylesPS []
 
const char * xFigDashStylesSVG []
 
const char * xFigDashStylesTikZ []
 
const char * XFigPostscriptFontnames []
 

Enumeration Type Documentation

◆ Alignment

The Alignment enum.

Enumerator
Top 
Bottom 
Center 
Left 
Right 

◆ ColorSpecification

enum class LibBoard::ColorSpecification
strong

The ColorSpecification enum.

Enumerator
PenColor 
FillColor 

◆ Direction

enum class LibBoard::Direction
strong

The Direction enum.

Enumerator
Top 
Right 
Bottom 
Left 

◆ LineCap

Enumerator
ButtCap 
RoundCap 
SquareCap 

◆ LineJoin

Enumerator
MiterJoin 
RoundJoin 
BevelJoin 

◆ LineStyle

Enumerator
SolidStyle 
DashStyle 
DotStyle 
DashDotStyle 
DashDotDotStyle 
DashDotDotDotStyle 

◆ LineWidthFlag

Enumerator
IgnoreLineWidth 
UseLineWidth 

◆ PageSize

enum class LibBoard::PageSize
strong

Page sizes.

Enumerator
BoundingBox 

No page size. The bounding box of the drawing will be used.

A0 
A1 
A2 
A3 
A4 
A5 
A6 
A7 
A8 
A9 
A10 
Letter 
Legal 
Executive 

◆ SketchFilling

Enumerator
NoFilling 
PlainFilling 
StraightHachure 
CrossingHachure 
SketchyHachure 
SketchyCrossingHachure 

◆ Unit

enum class LibBoard::Unit
strong

Length units.

Enumerator
Point 

A point is 1/72 inch.

Inch 

25.4 mm

Centimeter 
Millimeter 

Function Documentation

◆ almostEqual()

bool LibBoard::almostEqual ( const Point a,
const Point b 
)
inline

Check if two points are almost equal according to Tools::almostEqual.

Parameters
aA point
bA point
Returns
true if a and b are almost equal

References LibBoard::Tools::almostEqual().

Referenced by LibBoard::RoughVisitor::map().

◆ array()

Group LibBoard::array ( Point  topLeft,
const std::vector< Color > &  colors,
unsigned int  columns,
unsigned int  rows,
double  pixelWidth,
double  pixelHeight = 0.0,
double  lineWidth = 0.0 
)

Produce a rectangular color matrix.

Parameters
topLeft
colors
columns
rows
pixelWidth
pixelHeightif zero (default), then it take the same value as pixelHeight
lineWidthif zero, pixels are drawn with Color::Null outline (i.e. color is "none")
Returns
A group of rows x columns rectangles colored after given vector

References LibBoard::Style::fillColor, MiterJoin, LibBoard::Color::Null, LibBoard::Style::penColor, rectangle(), SolidStyle, SquareCap, LibBoard::Point::x, and LibBoard::Point::y.

Referenced by space_invader().

◆ bezierControls()

Polyline LibBoard::bezierControls ( const Bezier bezier,
const Style style = Style::defaultStyle() 
)

Produce a polyline of the Biezer vertices and control points.

Parameters
bezierA Bezier
styleStyle of the polyline
Returns
A polyline showing the Bezier points and controls

References LibBoard::Path::back(), LibBoard::Path::begin(), LibBoard::Bezier::controls(), LibBoard::Path::Open, LibBoard::Bezier::path(), and LibBoard::Path::points().

Referenced by main().

◆ boardFontText()

Group LibBoard::boardFontText ( Point  baselineStart,
const std::string &  text,
double  size,
Color  penColor = Style::defaultPenColor(),
double  lineWidth = 0.0 
)

◆ circle() [1/3]

Ellipse LibBoard::circle ( double  x,
double  y,
double  radius,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle() 
)

◆ circle() [2/3]

Ellipse LibBoard::circle ( Point  center,
double  radius,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle() 
)

◆ circle() [3/3]

Ellipse LibBoard::circle ( Point  center,
double  radius,
Style  style 
)

◆ circled()

Group LibBoard::circled ( const Shape shape,
double  margin = 0.0,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
LineStyle  lineStyle = Style::defaultLineStyle() 
)

Surround a shape with a cirle.

Parameters
shapeA shape
marginSpace between the shape and the circle
penColorPen color
fillColorFill color
lineWidthLine width
lineStyleLine style
Returns
A Group of the shape with its surrounding circle

References LibBoard::Shape::boundingBox(), LibBoard::Rect::center(), circle(), LibBoard::Rect::diameter(), and UseLineWidth.

Referenced by main().

◆ cross()

Group LibBoard::cross ( Point  p,
const Style style = Style::defaultStyle() 
)

Make a small cross

Parameters
p
style
Returns
A cross made of two lines, centered at point p

References cross(), LibBoard::Style::lineWidth, and LibBoard::Point::translated().

Referenced by cross(), and main().

◆ framed()

Group LibBoard::framed ( const Shape shape,
double  margin = 0.0,
const Color penColor = Style::defaultPenColor(),
const Color fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
LineStyle  lineStyle = Style::defaultLineStyle(),
int  sketchyCount = 0 
)

Surround a shape with a rectangular frame.

Parameters
shapeA shape
marginSpace between the shape and the frame
penColorFrame color
fillColorFill color
lineWidthLine width
lineStyleLine style
sketchyCountIf set to zero, the frame is a straight one, otherwise a sketchy frame is produced with given repetition count.
Returns
A group of the shape with its frame

References LibBoard::Shape::bbox(), LibBoard::Rect::grow(), makeRough(), NoFilling, rectangle(), and UseLineWidth.

Referenced by LeaveBox(), main(), rough(), and text().

◆ grid() [1/2]

Group LibBoard::grid ( Point  topLeft,
size_t  columns,
size_t  rows,
double  width,
double  height,
Color  penColor,
Color  fillColor,
double  lineWidth,
const LineStyle  style = SolidStyle,
const LineCap  cap = ButtCap,
const LineJoin  join = MiterJoin 
)

Build a grid with specified number of rows and columns and a given size.

Parameters
topLeftCoordinates of the top left point of the grid.
columnsNumber of columns of the grid.
rowsNumber of rows of the grid.
widthWidth of the grid.
heightHeight of the grid.
penColorColor of the lines.
fillColorBackground color.
lineWidthLine width.
styleLine style (default is Board::SolidStyle).
capLine cap (default is Board::ButtCap).
joinLine join (default is Board::MiterJoin).
Returns
The grid as a group.
Examples
examples/tilings.cpp.

References rectangle(), RoundCap, LibBoard::Line::translate(), LibBoard::Point::x, and LibBoard::Point::y.

Referenced by grid(), and main().

◆ grid() [2/2]

Group LibBoard::grid ( Point  topLeft,
size_t  columns,
size_t  rows,
double  width,
double  height,
const Style style = Style::defaultStyle() 
)

Build a grid with specified number of rows and columns and a given size.

Parameters
topLeftCoordinates of the top left point of the grid.
columnsNumber of columns of the grid.
rowsNumber of rows of the grid.
widthWidth of the grid.
heightHeight of the grid.
styleShape style
Returns
The grid as a group.

References LibBoard::Style::fillColor, grid(), LibBoard::Style::lineCap, LibBoard::Style::lineJoin, LibBoard::Style::lineStyle, LibBoard::Style::lineWidth, and LibBoard::Style::penColor.

◆ hachures() [1/5]

std::vector< std::tuple< Point, Point > > LibBoard::hachures ( const Ellipse ellipse,
double  spacing,
double  angle = 0.0 
)

◆ hachures() [2/5]

ShapeList LibBoard::hachures ( const Ellipse ellipse,
Style  style,
SketchFilling  type,
double  spacing,
double  angle = 0.0 
)

◆ hachures() [3/5]

std::vector< std::tuple< Point, Point > > LibBoard::hachures ( const Path path,
double  spacing,
double  angle = 0.0,
bool  addHorizontals = false 
)

◆ hachures() [4/5]

ShapeList LibBoard::hachures ( const Path path,
SketchFilling  type,
Color  color,
double  width,
double  spacing,
double  angle = 0.0 
)

◆ hachures() [5/5]

ShapeList LibBoard::hachures ( const Path path,
Style  style,
SketchFilling  type,
double  spacing,
double  angle = 0.0,
bool  addHorizontals = false 
)

◆ hachuresLinesOrBezier()

ShapeList LibBoard::hachuresLinesOrBezier ( const std::vector< std::tuple< Point, Point > > &  lines,
Style  style,
SketchFilling  type 
)

◆ makeRough()

ShapeList LibBoard::makeRough ( const Shape shape,
int  repeat = 1,
SketchFilling  filling = PlainFilling,
double  hachureAngle = 0.0,
double  hachureSpacing = 0.0 
)

◆ mix() [1/3]

Path LibBoard::mix ( const Path a,
const Path b,
double  time 
)

Interpolate two paths according to a time (0 is a, 1 is b)

Parameters
aFirst path
bSecond path
timeInterpolation time in (0 is a, 1 is b)
Returns
Interpolated path

References LibBoard::Path::begin(), LibBoard::Path::end(), LibBoard::Tools::error, mix(), LibBoard::Path::openClosed(), LibBoard::Path::push_back(), and LibBoard::Path::size().

Referenced by diamond(), divided(), interpolate(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), merge(), mix(), mix(), Sierpinksi(), and LibBoard::Bezier::smoothedPolyline().

◆ mix() [2/3]

Point LibBoard::mix ( const Point a,
const Point b,
double  t 
)

Return an interpolated point between two points at 'time' t.

Parameters
aFirst point.
bSecond point.
tInterpolation time in [0,1]. 0 is a, 1 is b.
Returns
The interpolated point.

◆ mix() [3/3]

Polyline LibBoard::mix ( const Polyline a,
const Polyline b,
double  time 
)

◆ operator!=()

bool LibBoard::operator!= ( const Point a,
const Point b 
)
inline

Check if two points are different.

Parameters
aA point
bA point
Returns
true if the two points are different, otherwise false

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator&&()

Rect LibBoard::operator&& ( const Rect rectA,
const Rect rectB 
)

Computes the intersection of two bounding boxes.

Parameters
rectAA first rectangle.
rectBA second rectangle.
Returns
The intersecting rectangle of two bounding boxes.

References LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.

◆ operator*() [1/3]

double LibBoard::operator* ( const Point a,
const Point b 
)
inline

Compute the scalar product of two vectors.

Parameters
aA vector
bA vector
Returns
The scalar product of a and b

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator*() [2/3]

Point LibBoard::operator* ( const Point p,
double  s 
)
inline

Compute the product of a vector and a scalar.

Parameters
pA vector
sA scalar
Returns
The product of p and s

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator*() [3/3]

Point LibBoard::operator* ( double  s,
const Point p 
)
inline

Compute the product of a vector and a scalar.

Parameters
sA scalar
pA vector
Returns
The product of s and p

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator+()

Point LibBoard::operator+ ( const Point a,
const Point b 
)
inline

Compute the sum of two vectors.

Parameters
aA vector
bA vector
Returns
The sum of a and b

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator-()

Point LibBoard::operator- ( const Point a,
const Point b 
)
inline

Compute the difference between two vectors.

Parameters
aA vector
bA vector
Returns
The vector a-b

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator/()

Point LibBoard::operator/ ( const Point p,
double  s 
)
inline

Compute the division of a vector by a scalar.

Parameters
pA vector
sA scalar
Returns
The division of p by s

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator<<() [1/2]

std::ostream & LibBoard::operator<< ( std::ostream &  out,
const Color color 
)

◆ operator<<() [2/2]

std::ostream & LibBoard::operator<< ( std::ostream &  out,
const Style style 
)

◆ operator==()

bool LibBoard::operator== ( const Point a,
const Point b 
)
inline

Check if two points are equal.

Parameters
aA point
bA point
Returns
true if the two points are equal, otherwise false

References LibBoard::Point::x, and LibBoard::Point::y.

◆ operator||()

Rect LibBoard::operator|| ( const Rect rectA,
const Rect rectB 
)

Computes the bounding box of two bounding boxes.

Parameters
rectAA first rectangle.
rectBA second rectangle.
Returns
The smallest rectangle that contains both rectA and rectB.

References LibBoard::Rect::height, LibBoard::Rect::isNull(), LibBoard::Rect::left, LibBoard::Rect::top, and LibBoard::Rect::width.

◆ orthogonal()

bool LibBoard::orthogonal ( const Point a,
const Point b 
)

Check if two vectors are orthogonals.

Parameters
aA vector
bA vector
Returns
true if the two vectors are orthogonal, otherwise false

References LibBoard::Tools::almostEqual().

Referenced by LibBoard::Polyline::flushSVG().

◆ rectangle() [1/4]

Polyline LibBoard::rectangle ( const Rect rect,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle(),
const LineCap  cap = Style::defaultLineCap(),
const LineJoin  join = Style::defaultLineJoin() 
)

◆ rectangle() [2/4]

Polyline LibBoard::rectangle ( const Rect rect,
const Style style 
)

◆ rectangle() [3/4]

Polyline LibBoard::rectangle ( double  left,
double  top,
double  width,
double  height,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle(),
const LineCap  cap = Style::defaultLineCap(),
const LineJoin  join = Style::defaultLineJoin() 
)

◆ rectangle() [4/4]

Polyline LibBoard::rectangle ( double  left,
double  top,
double  width,
double  height,
const Style style 
)

◆ tiling()

Group LibBoard::tiling ( const Shape shape,
Point  topLeftCorner,
int  columns,
int  rows,
double  spacing = 0.0,
LineWidthFlag  lineWidthFlag = UseLineWidth 
)

Builds a tiling based on a shape by repeating this shape along its bounding box.

Parameters
shapeA shape to be repeated.
topLeftCornerPosition of the top left corner of the tiling.
columnsNumber of columns of the tiling.
rowsNumber of rows of the tiling.
spacingSpacing between rows and columns.
lineWidthFlagShould the line width be considered when computing bounding boxes.
Returns
The tiling that has been created, as a Group.

References LibBoard::Shape::boundingBox(), LibBoard::Shape::clone(), LibBoard::Rect::height, LibBoard::Rect::left, LibBoard::Rect::top, LibBoard::Shape::translate(), LibBoard::Rect::width, LibBoard::Point::x, and LibBoard::Point::y.

Referenced by main().

◆ triangle() [1/3]

Polyline LibBoard::triangle ( const double  x1,
const double  y1,
const double  x2,
const double  y2,
const double  x3,
const double  y3,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle(),
const LineCap  cap = Style::defaultLineCap(),
const LineJoin  join = Style::defaultLineJoin() 
)

◆ triangle() [2/3]

Polyline LibBoard::triangle ( const Point p1,
const Point p2,
const Point p3,
Color  penColor = Style::defaultPenColor(),
Color  fillColor = Style::defaultFillColor(),
double  lineWidth = Style::defaultLineWidth(),
const LineStyle  lineStyle = Style::defaultLineStyle(),
const LineCap  cap = Style::defaultLineCap(),
const LineJoin  join = Style::defaultLineJoin() 
)

◆ triangle() [3/3]

Polyline LibBoard::triangle ( const Point p1,
const Point p2,
const Point p3,
const Style style 
)

Variable Documentation

◆ PSFontNames

const char * LibBoard::PSFontNames

◆ xFigDashStylesPS

const char * LibBoard::xFigDashStylesPS
Initial value:
= {
" [] 0 sd ",
" [1 1] 0 sd ",
" [1.5 4.5] 45 sd ",
" [4.5 2.3 1.5 2.3] 0 sd ",
" [4.5 2.0 1.5 1.5 1.5 2.0] 0 sd ",
" [4.5 1.8 1.5 1.4 1.5 1.4 1.5 1.8 ] 0 sd "
}

Referenced by LibBoard::Style::postscriptProperties().

◆ xFigDashStylesSVG

const char * LibBoard::xFigDashStylesSVG
Initial value:
= {
"",
"stroke-dasharray:1,1;stroke-dashoffset:0",
"stroke-dasharray:1.5,4.5;stroke-dashoffset:45",
"stroke-dasharray:4.5,2.3,1.5,2.3;stroke-dashoffset:0",
"stroke-dasharray:4.5,2.0,1.5,1.5,1.5,2.0;stroke-dashoffset;0",
"stroke-dasharray:4.5,1.8,1.5,1.4,1.5,1.4,1.5,1.8;stroke-dashoffset:0"
}

Referenced by LibBoard::Style::svgProperties().

◆ xFigDashStylesTikZ

const char * LibBoard::xFigDashStylesTikZ
Initial value:
= {
"",
"dash pattern=on 1pt off 1pt,",
"dotted,",
"dashdotted,",
"dashdotdotted,",
"dash pattern=on 2pt off 3pt on 4pt off 4pt,"
}

Referenced by LibBoard::Style::tikzProperties().

◆ XFigPostscriptFontnames

const char * LibBoard::XFigPostscriptFontnames
extern