points property

  1. @override
List<PathPoint> get points
override

Implementation

@override
List<PathPoint> get points {
  List<PathPoint> _polygonPoints = <PathPoint>[];
  double angle = -pi / 2.0;
  double inc = (pi * 2.0) / sides;

  for (int i = 0; i < sides; i++) {
    _polygonPoints.add(StraightPathPoint.fromTranslation(
        Vec2D.fromValues(cos(angle) * radiusX, sin(angle) * radiusY)));
    angle += inc;
  }

  return _polygonPoints;
}