SPath.fromPoints constructor

SPath.fromPoints(
  1. List<Point<double>> points
)

Conveniently construct from a List of Point

Implementation

SPath.fromPoints(List<Point<double>> points) {
  if (points.isEmpty) throw Exception("Must supply at least one point");
  currentPoint = points.first;
  for (var i = 1; i < points.length; i++) {
    line(to: points[i]);
  }
}