scale method

  1. @override
CubicLine scale(
  1. double scaleX,
  2. double scaleY
)
override

Returns a new offset with the x component scaled by scaleX and the y component scaled by scaleY.

If the two scale arguments are the same, consider using the * operator instead:

Offset a = const Offset(10.0, 10.0);
Offset b = a * 2.0; // same as: a.scale(2.0, 2.0)

If the two arguments are -1, consider using the unary - operator instead:

Offset a = const Offset(10.0, 10.0);
Offset b = -a; // same as: a.scale(-1.0, -1.0)

Implementation

@override
CubicLine scale(double scaleX, double scaleY) => CubicLine(
      start: start.scale(scaleX, scaleY),
      cpStart: cpStart.scale(scaleX, scaleY),
      cpEnd: cpEnd.scale(scaleX, scaleY),
      end: end.scale(scaleX, scaleY),
      upStartVector: _upStartVector,
      upEndVector: _upEndVector,
      startSize: startSize,
      endSize: endSize,
    );