code: public void closePath() {
  		if (this.numTypes<=0 ||
  				(this.types[this.numTypes-1]!=PathElementType.CLOSE
  				&&this.types[this.numTypes-1]!=PathElementType.MOVE_TO)) {
  			ensureSlots(true, 0);
  			this.types[this.numTypes++] = PathElementType.CLOSE;
  		}
  	}
docs: Closes the current subpath by drawing a straight line back to
  the coordinates of the last {@code moveTo}.  If the path is already
  closed or if the previous coordinates are for a {@code moveTo}
  then this method has no effect.