44 contourEndPoints.
clear();
45 layerEndContours.
clear();
54 [[nodiscard]] ssize_t numberOfLayers() const noexcept;
58 [[nodiscard]]
bool allLayersHaveSameColor() const noexcept;
62 [[nodiscard]] aarectangle boundingBox() const noexcept;
68 void tryRemoveLayers() noexcept;
72 [[nodiscard]]
std::vector<
bezier_point>::const_iterator beginContour(ssize_t contourNr) const noexcept;
76 [[nodiscard]]
std::vector<
bezier_point>::const_iterator endContour(ssize_t contourNr) const noexcept;
80 [[nodiscard]] ssize_t beginLayer(ssize_t layerNr) const noexcept;
84 [[nodiscard]] ssize_t endLayer(ssize_t layerNr) const noexcept;
86 [[nodiscard]]
std::vector<
bezier_point> getbezier_pointsOfContour(ssize_t contourNr) const noexcept;
88 [[nodiscard]]
std::vector<
bezier_curve> getBeziersOfContour(ssize_t contourNr) const noexcept;
92 [[nodiscard]]
std::pair<
graphic_path, color> getLayer(ssize_t layerNr) const noexcept;
94 [[nodiscard]] color getColorOfLayer(ssize_t layerNr) const noexcept;
96 void setColorOfLayer(ssize_t layerNr, color fill_color) noexcept;
100 [[nodiscard]]
bool isContourOpen() const noexcept;
105 void closeContour() noexcept;
109 [[nodiscard]]
bool hasLayers() const noexcept;
113 [[nodiscard]]
bool isLayerOpen() const noexcept;
118 void closeLayer(color fill_color) noexcept;
123 void optimizeLayers() noexcept;
128 [[nodiscard]]
point2 currentPosition() const noexcept;
138 void moveRelativeTo(vector2 direction) noexcept;
140 void lineTo(
point2 position) noexcept;
142 void lineRelativeTo(vector2 direction) noexcept;
144 void quadraticCurveTo(
point2 controlPosition,
point2 position) noexcept;
150 void quadraticCurveRelativeTo(vector2 controlDirection, vector2 direction) noexcept;
152 void cubicCurveTo(
point2 controlPosition1,
point2 controlPosition2,
point2 position) noexcept;
159 void cubicCurveRelativeTo(vector2 controlDirection1, vector2 controlDirection2, vector2 direction) noexcept;
172 void arcTo(
float radius,
point2 position) noexcept;
179 void addRectangle(aarectangle rectangle, corner_radii corners = corner_radii{0.0f, 0.0f, 0.0f, 0.0f})
noexcept;
196 std::vector<bezier_point>::const_iterator
const &begin,
197 std::vector<bezier_point>::const_iterator
const &end)
noexcept;
215 float tolerance = 0.05f) noexcept;
229 float strokeWidth = 1.0f,
230 line_join_style line_join_style = line_join_style::miter,
231 float tolerance = 0.05f) const noexcept;
235 [[nodiscard]]
graphic_path centerScale(extent2 extent,
float padding = 0.0) const noexcept;
247 for (
auto &point : rhs_.points) {
void composit(pixmap_span< sfloat_rgba16 > dst, hi::color color, graphic_path const &mask) noexcept
Composit color onto the destination image where the mask is solid.
std::vector< bezier_point > points
A set of all bezier points describing all bezier curves, contours and layers.
Definition graphic_path.hpp:29
void addStroke(graphic_path const &path, color strokeColor, float strokeWidth, hi::line_join_style line_join_style=line_join_style::miter, float tolerance=0.05f) noexcept
Stroke a path and close layer.
void addContour(std::vector< bezier_point >::const_iterator const &begin, std::vector< bezier_point >::const_iterator const &end) noexcept
Curve with the given bezier curve.