toCubic method
Converts this segment to a CubicSegment.
This method is used for morphing.
The algrithoms are from https://github.com/thednp/svg-path-commander 2.0.2
Implementation
@override
CubicSegment toCubic(Offset start) {
final middleBase = (start + end) / 2;
final quadraticControl = Offset.lerp(middleBase, control, weight);
final controls = quadraticToCubicControls(start, quadraticControl!, end);
return CubicSegment(
control1: controls.first,
control2: controls.last,
end: end,
tag: tag,
);
}