|
Wavelength
Privacy-focused, cross-platform, and open-source communication application
|
Provides a static utility function to create a smooth QPainterPath from blob control points. More...
#include <blob_path.h>
Static Public Member Functions | |
| static QPainterPath | CreateBlobPath (const std::vector< QPointF > &control_points, int num_of_points) |
| Creates a closed, smooth QPainterPath using Catmull-Rom-like spline interpolation. | |
Provides a static utility function to create a smooth QPainterPath from blob control points.
This class is used to generate the visual outline of the blob by creating a closed curve that interpolates smoothly through the given control points.
|
static |
Creates a closed, smooth QPainterPath using Catmull-Rom-like spline interpolation.
Iterates through the provided control points and generates cubic Bezier segments to create a smooth, closed curve passing through them. Uses neighboring points to calculate control handles for the Bézier curves, effectively creating a Catmull-Rom spline effect with a specified tension. Includes validation to skip invalid points.
| control_points | A vector containing the QPointF coordinates of the blob's control points. |
| num_of_points | The number of control points in the vector. Should match control_points.size(). |