Closes the last path of this multipath with a line segment. The closing
segment is a segment that connects the last and the first points of the
path. This is a virtual segment. The first point is not duplicated to
close the path.
Call this method only for polylines. For polygons this method is
implicitly called for the Polygon class.