expressiveCubicsPath function
cubics as one closed path (Compose's pathFromCubics).
Implementation
Path expressiveCubicsPath(List<ExpressiveShapeCubic> cubics) {
final path = Path();
for (var i = 0; i < cubics.length; i++) {
final c = cubics[i];
if (i == 0) path.moveTo(c.anchor0X, c.anchor0Y);
path.cubicTo(
c.control0X,
c.control0Y,
c.control1X,
c.control1Y,
c.anchor1X,
c.anchor1Y,
);
}
return path..close();
}