CubicLine constructor
CubicLine({
- required OffsetPoint start,
- required Offset cpStart,
- required Offset cpEnd,
- required OffsetPoint end,
- Offset? upStartVector,
- Offset? upEndVector,
- double startSize = 0.0,
- double endSize = 0.0,
Based on Bezier Cubic curve.
start
point of curve.
end
point of curve.
cpStart
- control point of start
vector.
cpEnd
- control point of end
vector.
startSize
- size ratio at begin of curve.
endSize
- size ratio at end of curve.
upStartVector
- pre-calculated Up vector fo start point.
upEndVector
- pre-calculated Up vector of end point.
Implementation
CubicLine({
required this.start,
required this.cpStart,
required this.cpEnd,
required this.end,
Offset? upStartVector,
Offset? upEndVector,
this.startSize = 0.0,
this.endSize = 0.0,
}) : super(start.dx, start.dy) {
_upStartVector = upStartVector;
_upEndVector = upEndVector;
_velocity = end.velocityFrom(start);
_distance = start.distanceTo(end);
}