Board
0.9.5
include
board
PathBoundaries.h
Go to the documentation of this file.
1
/* -*- mode: c++ -*- */
26
#ifndef BOARD_PATH_BOUNDARIES_H
27
#define BOARD_PATH_BOUNDARIES_H
28
29
#include <vector>
30
#include "
board/Point.h
"
31
#include "
board/Rect.h
"
32
#include "
board/Shape.h
"
33
namespace
LibBoard
34
{
35
36
struct
Path;
37
38
namespace
Tools
39
{
40
41
/*
42
* An euclidean line a.x + b.y + c = 0
43
*/
44
struct
EuclideanLine
{
45
EuclideanLine
(
double
a,
double
b,
double
c) : a(a), b(b), c(c) {}
46
EuclideanLine
(
Point
p1,
Point
p2)
47
{
48
a = p1.
y
- p2.
y
;
49
b = p2.
x
- p1.
x
;
50
c = p1.
x
* (p2.
y
- p1.
y
) + p1.
y
* (p1.
x
- p2.
x
);
51
}
52
double
a, b, c;
53
};
54
55
std::vector<Point> pathBoundaryPoints(
const
Path
& path,
double
strokeWidth, LineCap lineCap, LineJoin lineJoin,
double
miterLimit = 4.0);
56
57
Rect
pathBoundingBox(
const
Path
& path,
double
strokeWidth, LineCap lineCap, LineJoin lineJoin,
double
miterLimit = 4.0);
58
59
}
// namespace Tools
60
61
}
// namespace LibBoard
62
63
#endif
/* PATH_BOUNDARIES_H */
Shape.h
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
Point.h
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
LibBoard::Rect
Struct representing a rectangle on the plane.
Definition:
Rect.h:39
LibBoard::Point::x
double x
Definition:
Point.h:43
LibBoard::Point
Struct representing a 2D point.
Definition:
Point.h:42
LibBoard::Path
A path, according to Postscript and SVG definition.
Definition:
Path.h:45
LibBoard::Tools::EuclideanLine
Definition:
PathBoundaries.h:44
Rect.h
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
LibBoard::Point::y
double y
Definition:
Point.h:44
Generated by
1.8.17