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,
Creates a CubicLine segment.
start
The initial point of the curve.
end
The end point of the curve.
cpStart
The control point associated with the start
vector.
cpEnd
The control point associated with the end
vector.
upStartVector
An optional pre-calculated 'Up' vector for the start point.
upEndVector
An optional pre-calculated 'Up' vector for the end point.
startSize
The initial size ratio of the line at the beginning of the curve.
endSize
The final size ratio of the line at the end of the curve.
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);
}