points property

  1. @override
List<PathPoint> points
override

Implementation

@override
List<PathPoint> get points {
  double halfWidth = width / 2;
  double halfHeight = height / 2;
  double renderRadius = min(_radius, min(halfWidth, halfHeight));
  List<PathPoint> _rectanglePathPoints = <PathPoint>[];
  _rectanglePathPoints.add(StraightPathPoint.fromValues(
      Vec2D.fromValues(-halfWidth, -halfHeight), renderRadius));
  _rectanglePathPoints.add(StraightPathPoint.fromValues(
      Vec2D.fromValues(halfWidth, -halfHeight), renderRadius));
  _rectanglePathPoints.add(StraightPathPoint.fromValues(
      Vec2D.fromValues(halfWidth, halfHeight), renderRadius));
  _rectanglePathPoints.add(StraightPathPoint.fromValues(
      Vec2D.fromValues(-halfWidth, halfHeight), renderRadius));

  return _rectanglePathPoints;
}