scale method
Create a scaled copy of this stroke
Implementation
PencilStroke scale({required double scale}) {
final scaledPoints = <Point>[];
for (final point in _points) {
scaledPoints.add(Point(point.x * scale, point.y * scale));
}
final scaledPaint = pencilPaint.copyWith(
strokeWidth: pencilPaint.paint.strokeWidth * scale,
);
return PencilStroke(
points: scaledPoints,
bezierDistance: bezierDistance,
pencilPaint: scaledPaint,
);
}