#include <ctime>
{
std::string s;
for (int c = '!'; c <= '~'; ++c) {
}
g = boardFontText(
Point(10, 20), s, 40);
g.
append(makeRough(boardFontText(
Point(0, 0), s, 40), 1), Direction::Bottom, Alignment::Left);
return framed(g, 10.0, Color::Black, Color::White, 1.0);
}
{
auto t = time(nullptr);
Tools::initBoardRand(static_cast<unsigned long>(t));
Board::disableLineWidthScaling();
Style::setDefaultLineWidth(1);
board.
saveSVG(
"board_font_text.svg", PageSize::BoundingBox);
}
Declaration of the Board class.
int main(int argc, char *argv[])
Definition arithmetic.cpp:16
Group text()
Definition board_font_text.cpp:17
Class for EPS, FIG or SVG drawings.
Definition Board.h:61
Board & setPenColor(const Color &color)
Definition Board.cpp:244
Board & setFillColor(const Color &color)
Definition Board.cpp:268
Board & setLineWidth(double width)
Definition Board.cpp:274
void saveSVG(const char *filename, PageSize size=PageSize::BoundingBox, double margin=0.0, Unit unit=Unit::Millimeter) const
Definition Board.cpp:765
A line between two points.
Definition Dot.h:42
A group of shapes. A group is basically a ShapeList except that when rendered in either an SVG of a F...
Definition Group.h:40
Group * accept(CompositeShapeTransform &transform) const override
Accept a composite shape transform.
Definition Group.cpp:221
Rect boundingBox(LineWidthFlag) const override
Definition Group.cpp:212
A line between two points.
Definition Line.h:38
Struct representing a 2D point.
Definition Point.h:42
double width
Definition Rect.h:43
ShapeList & push_back(Shape *shape)
Definition ShapeList.cpp:427
ShapeList & append(const Shape &shape, Direction direction=Direction::Right, Alignment alignment=Alignment::Center, double margin=0.0, LineWidthFlag lineWidthFlag=UseLineWidth)
Definition ShapeList.cpp:232
Leaf visitor may be used to apply a function on each Shape with style, in back-to-front order.
Definition ShapeVisitor.h:248