Board
0.9.6
examples/sandbox.cpp
#include <
Board.h
>
using namespace
LibBoard
;
int
main
(
int
,
char
*[])
{
Board
board;
Polyline
p = rectangle(0, 0, 10, 4, Color::Pink);
Point
corner = p.
boundingBox
(IgnoreLineWidth).
bottomLeft
();
for
(
float
a = 0; a < 200; a += 10) {
p = p.
translated
(10, 0).
rotated
(10 * Board::Degree);
board << p;
}
board << cross(corner);
board.
saveSVG
(
"sandbox.svg"
);
// system("svgviewer sandbox.svg");
}
Board.h
Declaration of the Board class.
main
int main(int argc, char *argv[])
Definition
arithmetic.cpp:16
LibBoard
Definition
Board.h:55
LibBoard::Board
Class for EPS, FIG or SVG drawings.
Definition
Board.h:61
LibBoard::Board::saveSVG
void saveSVG(const char *filename, PageSize size=PageSize::BoundingBox, double margin=0.0, Unit unit=Unit::Millimeter) const
Definition
Board.cpp:765
LibBoard::Point
Struct representing a 2D point.
Definition
Point.h:42
LibBoard::Polyline
A polygonal line described by a series of 2D points.
Definition
Polyline.h:38
LibBoard::Polyline::rotated
Polyline rotated(double angle, const Point ¢er) const
Definition
Polyline.cpp:72
LibBoard::Polyline::translated
Polyline translated(double dx, double dy) const
Definition
Polyline.cpp:99
LibBoard::Polyline::boundingBox
Rect boundingBox(LineWidthFlag) const override
Definition
Polyline.cpp:328
LibBoard::Rect::bottomLeft
Point bottomLeft() const
bottomLeft Bottom-left point of the rectangle
Definition
Rect.h:89
Generated by
1.9.7