Expand description
Bezier curve generators (quadratic and cubic).
Port of agg_curves.h / agg_curves.cpp — provides two algorithms for
flattening Bezier curves into line segments:
- Incremental (
Curve3Inc,Curve4Inc): forward-differencing, fast but less precise for extreme curvatures. - Subdivision (
Curve3Div,Curve4Div): recursive de Casteljau subdivision, adaptive and high-quality.
The facade types Curve3 and Curve4 delegate to either algorithm.
Also provides conversion functions: catrom_to_bezier,
ubspline_to_bezier, hermite_to_bezier.
Structs§
- Curve3
- Quadratic Bezier curve with selectable algorithm.
- Curve4
- Cubic Bezier curve with selectable algorithm.
- Curve3
Div - Recursive subdivision quadratic Bezier curve flattener.
- Curve3
Inc - Incremental quadratic Bezier curve flattener using forward differences.
- Curve4
Div - Recursive subdivision cubic Bezier curve flattener.
- Curve4
Inc - Incremental cubic Bezier curve flattener using forward differences.
- Curve4
Points - Eight control-point coordinates for a cubic Bezier curve.
Enums§
- Curve
Approximation Method - Algorithm selection for curve flattening.
Functions§
- catrom_
to_ bezier - Convert Catmull-Rom spline segment to cubic Bezier control points.
- hermite_
to_ bezier - Convert Hermite spline segment to cubic Bezier control points.
- ubspline_
to_ bezier - Convert uniform B-spline segment to cubic Bezier control points.