Open
Description
I'm using this library to create a path that consists of multiple curves, the issue is that when I draw the path using CustomPainter cubicTo
var cubic = GameObject.shared.cubicBeziers;
final Path path = Path();
for (var i = 0; i < cubic.length; i++) {
drawCurve(cubic[i], path);
}
path.close();
canvas.drawPath(path, _paint);
void drawCurve(CubicBezier curve, Path path) {
vectorMath.Vector2 point0 = curve.startPoint;
vectorMath.Vector2 point1 = curve.points[1];
vectorMath.Vector2 point2 = curve.points[2];
vectorMath.Vector2 point3 = curve.endPoint;
path.moveTo(point0.x, point0.y);
path.cubicTo(point1.x, point1.y, point2.x, point2.y, point3.x, point3.y);
}
And when I follow the path via percentages, they have a difference, especially on the y
axis
The issue can be seen here:
Metadata
Metadata
Assignees
Labels
No labels