Board
0.9.6
examples/array.cpp
#include <
Board.h
>
using namespace
LibBoard
;
Group
space_invader
()
{
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");
}
Board.h
Declaration of the Board class.
main
int main(int argc, char *argv[])
Definition
arithmetic.cpp:16
space_invader
Group space_invader()
Definition
array.cpp:14
LibBoard::Color
Structure representing an RGB triple.
Definition
Color.h:43
LibBoard
Definition
Board.h:55
LibBoard::SketchyHachure
@ SketchyHachure
Definition
Types.h:38
LibBoard::Board
Class for EPS, FIG or SVG drawings.
Definition
Board.h:61
LibBoard::Board::setLineWidth
Board & setLineWidth(double width)
Definition
Board.cpp:274
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::Group
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
LibBoard::Point
Struct representing a 2D point.
Definition
Point.h:42
LibBoard::ShapeList::append
ShapeList & append(const Shape &shape, Direction direction=Direction::Right, Alignment alignment=Alignment::Center, double margin=0.0, LineWidthFlag lineWidthFlag=UseLineWidth)
Definition
ShapeList.cpp:232
LibBoard::ShapeList::last
T & last(const std::size_t position=0)
Definition
ShapeList.h:505
Generated by
1.9.7