Board  0.9.5
SketchFilter.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
26 #ifndef BOARD_SKETCH_FILTER_H
27 #define BOARD_SKETCH_FILTER_H
28 
29 #include <tuple>
30 #include <vector>
31 #include "board/Point.h"
32 #include "board/Shape.h"
33 #include "board/ShapeList.h"
34 #include "board/Types.h"
35 
36 /*
37  *
38  * matplotlib.pyplot.xkcd
39  *
40  * https://shihn.ca/posts/2020/roughjs-algorithms/
41  *
42  * https://openaccess.city.ac.uk/id/eprint/1274/
43  */
44 
45 namespace LibBoard
46 {
47 struct Path;
48 struct Ellipse;
49 
50 ShapeList makeRough(const Shape & shape, int repeat = 1, SketchFilling filling = PlainFilling, double hachureAngle = 0.0, double hachureSpacing = 0.0);
51 
52 ShapeList hachuresLinesOrBezier(const std::vector<std::tuple<Point, Point>> & lines, Style style, SketchFilling type);
53 
54 std::vector<std::tuple<Point, Point>> hachures(const Path & path, double spacing, double angle = 0.0, bool addHorizontals = false);
55 
56 std::vector<std::tuple<Point, Point>> hachures(const Ellipse & ellipse, double spacing, double angle = 0.0);
57 
58 ShapeList hachures(const Ellipse & ellipse, Style style, SketchFilling type, double spacing, double angle = 0.0);
59 
60 ShapeList hachures(const Path & path, Style style, SketchFilling type, double spacing, double angle = 0.0, bool addHorizontals = false);
61 
62 ShapeList hachures(const Path & path, SketchFilling type, Color color, double width, double spacing, double angle = 0.0);
63 } // namespace LibBoard
64 
65 #endif /* BOARD_SKETCH_FILTER_H */
Shape.h
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
ShapeList.h
ShapeList class.
Point.h
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
Types.h
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...