|
| Path () noexcept |
|
| Path (const Path &other) noexcept |
|
| Path (const QVector< Vertex > &vertices) noexcept |
|
| Path (const SExpression &node) |
|
| ~Path () noexcept |
|
bool | isClosed () const noexcept |
|
bool | isCurved () const noexcept |
|
bool | isZeroLength () const noexcept |
|
QVector< Vertex > & | getVertices () noexcept |
|
const QVector< Vertex > & | getVertices () const noexcept |
|
UnsignedLength | getTotalStraightLength () const noexcept |
|
qreal | calcAreaOfStraightSegments () const noexcept |
|
Point | calcNearestPointBetweenVertices (const Point &p) const noexcept |
|
Path | cleaned () const noexcept |
|
Path | toClosedPath () const noexcept |
|
Path | toOpenPath () const noexcept |
|
QVector< Path > | toOutlineStrokes (const PositiveLength &width) const noexcept |
|
const QPainterPath & | toQPainterPathPx () const noexcept |
|
Path & | translate (const Point &offset) noexcept |
|
Path | translated (const Point &offset) const noexcept |
|
Path & | mapToGrid (const PositiveLength &gridInterval) noexcept |
|
Path | mappedToGrid (const PositiveLength &gridInterval) const noexcept |
|
Path & | rotate (const Angle &angle, const Point ¢er=Point(0, 0)) noexcept |
|
Path | rotated (const Angle &angle, const Point ¢er=Point(0, 0)) const noexcept |
|
Path & | mirror (Qt::Orientation orientation, const Point ¢er=Point(0, 0)) noexcept |
|
Path | mirrored (Qt::Orientation orientation, const Point ¢er=Point(0, 0)) const noexcept |
|
Path & | reverse () noexcept |
|
Path | reversed () const noexcept |
|
Path & | flattenArcs (const PositiveLength &maxTolerance) noexcept |
|
Path | flattenedArcs (const PositiveLength &maxTolerance) const noexcept |
|
void | addVertex (const Vertex &vertex) noexcept |
|
void | addVertex (const Point &pos, const Angle &angle=Angle::deg0()) noexcept |
|
void | insertVertex (int index, const Vertex &vertex) noexcept |
|
void | insertVertex (int index, const Point &pos, const Angle &angle=Angle::deg0()) noexcept |
|
bool | clean () noexcept |
|
bool | close () noexcept |
|
bool | open () noexcept |
|
void | serialize (SExpression &root) const |
| Serialize into librepcb::SExpression node.
|
|
Path & | operator= (const Path &rhs) noexcept |
|
bool | operator== (const Path &rhs) const noexcept |
|
bool | operator!= (const Path &rhs) const noexcept |
|
bool | operator< (const Path &rhs) const noexcept |
| The "<" operator to compare two librepcb::Path objects.
|
|
|
static Path | line (const Point &p1, const Point &p2, const Angle &angle=Angle::deg0()) noexcept |
|
static Path | circle (const PositiveLength &diameter) noexcept |
|
static Path | donut (const PositiveLength &outerDiameter, const PositiveLength &innerDiameter) noexcept |
|
static Path | obround (const PositiveLength &width, const PositiveLength &height) noexcept |
|
static Path | obround (const Point &p1, const Point &p2, const PositiveLength &width) noexcept |
|
static Path | arcObround (const Point &p1, const Point &p2, const Angle &angle, const PositiveLength &width) noexcept |
|
static Path | rect (const Point &p1, const Point &p2) noexcept |
|
static Path | centeredRect (const PositiveLength &width, const PositiveLength &height, const UnsignedLength &cornerRadius=UnsignedLength(0)) noexcept |
|
static Path | chamferedRect (const PositiveLength &width, const PositiveLength &height, const UnsignedLength &chamferSize, bool topLeft, bool topRight, bool bottomLeft, bool bottomRight) noexcept |
|
static Path | trapezoid (const PositiveLength &width, const PositiveLength &height, const Length &dw, const Length dh) noexcept |
|
static Path | octagon (const PositiveLength &width, const PositiveLength &height, const UnsignedLength &cornerRadius=UnsignedLength(0)) noexcept |
|
static Path | flatArc (const Point &p1, const Point &p2, const Angle &angle, const PositiveLength &maxTolerance) noexcept |
|
static QPainterPath | toQPainterPathPx (const QVector< Path > &paths, bool area) noexcept |
| Convert multiple librepcb::Path objects to a QPainterPath.
|
|
The Path class represents a list of vertices connected by straight lines or circular arc segments.
This class is similar to a polygon or polyline, but it doesn't have properties like width or layer. It's only a list of coordinates which are connected together by straight lines or circular arc segments.
A path may be closed (first point == last point) or open (first point != last point).
For a valid path, minimum two vertices are required. Paths with less than two vertices are useless and thus considered as invalid.