addPolygon method

void addPolygon(
  1. List<Offset> points
)

Adds a polygon

Implementation

void addPolygon(List<Offset> points) {
  final List<double> p = <double>[];
  startFigure();
  for (final Offset point in points) {
    p.add(point.dx);
    p.add(point.dy);
  }
  _addPoints(p, PathPointType.line);
  closeFigure();
}