Expands a polyline's control points into a smooth Catmull-Rom curve.
<insightdock/detail/spline.h>
[[visibility]]
std::vector<std::pair<float, float>>
catmull_rom_expand(
std::vector<std::pair<float, float>> const& points,
int segments_per_span = 8);
Used by LineChart/AreaChart/ComboChart when spline is enabled: the returned denser point list is passed to ImageBuffer::draw_polyline()/fill_polygon() unchanged, while the original points remain the marker/data-label positions.
points if fewer than 3 points are given.
| Name | Description |
|---|---|
| points | Control points (category-ordered). |
| segments_per_span | Points generated between each pair of control points. |