Board 0.9.6
examples/array.cpp
#include <Board.h>
using namespace LibBoard;
{
const Color b = Color::White;
const Color w = Color::Green;
std::vector<Color> v = {
b, b, b, b, b, b, b, b, b, b, b, b, b, //
b, b, b, w, b, b, b, b, b, w, b, b, b, //
b, b, b, b, w, b, b, b, w, b, b, b, b, //
b, b, b, w, w, w, w, w, w, w, b, b, b, //
b, b, w, w, b, w, w, w, b, w, w, b, b, //
b, w, w, w, w, w, w, w, w, w, w, w, b, //
b, w, b, w, w, w, w, w, w, w, b, w, b, //
b, w, b, w, b, b, b, b, b, w, b, w, b, //
b, b, b, b, w, w, b, w, w, b, b, b, b, //
b, b, b, b, b, b, b, b, b, b, b, b, b, //
};
return array(Point(0, 0), v, 13, 10, 4, 4, 0.1);
}
int main(int, char *[])
{
Board board;
Board::disableLineWidthScaling();
board.setLineWidth(1.0);
board << space_invader();
board.append(makeRough(board.last<Group>(), 2, LibBoard::SketchyHachure, 10.0 * Board::Degree));
board.saveSVG("array.svg", PageSize::BoundingBox);
// system("svgviewer array.svg");
}
Declaration of the Board class.
int main(int argc, char *argv[])
Definition arithmetic.cpp:16
Group space_invader()
Definition array.cpp:14
Structure representing an RGB triple.
Definition Color.h:43
Definition Board.h:55
@ SketchyHachure
Definition Types.h:38
Class for EPS, FIG or SVG drawings.
Definition Board.h:61
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 group of shapes. A group is basically a ShapeList except that when rendered in either an SVG of a F...
Definition Group.h:40
Struct representing a 2D point.
Definition Point.h:42
ShapeList & append(const Shape &shape, Direction direction=Direction::Right, Alignment alignment=Alignment::Center, double margin=0.0, LineWidthFlag lineWidthFlag=UseLineWidth)
Definition ShapeList.cpp:232
T & last(const std::size_t position=0)
Definition ShapeList.h:505