closePath method

dynamic closePath()

Implementation

closePath() {
  // Add a line curve if start and end of lines are not connected
  var startPoint = curves[0].getPoint(0, null);
  var endPoint = curves[curves.length - 1].getPoint(1, null);

  if (!startPoint.equals(endPoint)) {
    curves.add(LineCurve(endPoint, startPoint));
  }
}