7#include "bezier_point.hpp"
8#include "bezier_curve.hpp"
9#include "utility/module.hpp"
10#include "geometry/module.hpp"
11#include "image/module.hpp"
14namespace hi::inline
v1 {
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;
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) {
line_join_style
The way two lines should be joined.
Definition line_join_style.hpp:18
DOXYGEN BUG.
Definition algorithm.hpp:13
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.
Definition bezier_curve.hpp:22
Definition bezier_point.hpp:16
This is a RGBA floating point color.
Definition color.hpp:44
A rectangle / parallelogram in 3D space.
Definition rectangle.hpp:20
Definition graphic_path.hpp:18
A path is a vector graphics object.
Definition graphic_path.hpp:26
void addCircle(point2 position, float radius) noexcept
Draw a circle.
std::vector< std::pair< ssize_t, color > > layerEndContours
An color and index into.
Definition graphic_path.hpp:37
void addPath(graphic_path const &path, color fill_color) noexcept
Add path and close layer.
void addContour(std::vector< bezier_point > const &contour) noexcept
Curve with the given bezier curve.
std::vector< ssize_t > contourEndPoints
An index into.
Definition graphic_path.hpp:33
std::vector< bezier_point > points
A set of all bezier points describing all bezier curves, contours and layers.
Definition graphic_path.hpp:29
void clear() noexcept
Clear the path.
Definition graphic_path.hpp:41
void addContour(std::vector< bezier_curve > const &contour) noexcept
Contour with the given bezier curves.
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.
ssize_t numberOfContours() const noexcept
Return the number of closed contours.
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.
Definition transform.hpp:84