forked from c-koi/libboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.cpp
More file actions
42 lines (40 loc) · 1.31 KB
/
array.cpp
File metadata and controls
42 lines (40 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @file array.cpp
* @author Sebastien Fourey (GREYC)
*
* @brief Illustrate the rough shape filter
*
* This source code is part of the Board project, a C++ library whose
* purpose is to allow simple drawings in EPS, FIG or SVG files.
* Copyright (C) 2007 Sebastien Fourey <https://fourey.users.greyc.fr>
*/
#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");
}