#include <hikogui/graphic_path/bezier_point.hpp>
|
| enum class | Type { Anchor
, QuadraticControl
, CubicControl1
, CubicControl2
} |
|
|
constexpr | bezier_point (point2 const p, Type const type) noexcept |
|
constexpr | bezier_point (float const x, float const y, Type const type) noexcept |
|
|
constexpr friend bool | operator== (bezier_point const &, bezier_point const &) noexcept=default |
| constexpr friend bezier_point | operator* (transformer2 auto const &lhs, bezier_point const &rhs) noexcept |
| | Transform the point.
|
A point or control-point on contour of bezier curves. The bezier curves can be linear (a line), quadratic or cubic.
◆ normalizePoints()
| constexpr std::vector< bezier_point > hi::v1::bezier_point::normalizePoints |
( |
std::vector< bezier_point >::const_iterator const | begin, |
|
|
std::vector< bezier_point >::const_iterator const | end ) |
|
inlinestaticnodiscardconstexprnoexcept |
Normalize points in a list. The following normalizations are executed:
- Missing anchor points between two quadratic-control-points are added.
- Missing first-cubic-control-points are added by reflecting the previous second-control point around the previous anchor.
- The list of points will start with an anchor.
- The list will close with the first anchor.
- Parameters
-
| begin | iterator to the start of the bezier point list. |
| end | iterator beyond the end of the bezier point list. |
- Returns
- a vector of bezier point that include all the anchor and control points.
◆ operator*
| friend bezier_point operator* |
( |
transformer2 auto const & | lhs, |
|
|
bezier_point const & | rhs ) |
|
friend |
The documentation for this struct was generated from the following file: