code: public void closeAllPaths() {
  		_touch();
  		if (m_bPolygon || isEmptyImpl())
  			return;
  
  		m_bPathStarted = false;
  
  		for (int ipath = 0, npart = m_paths.size() - 1; ipath < npart; ipath++) {
  			if (isClosedPath(ipath))
  				continue;
  
  			byte pf = m_pathFlags.read(ipath);
  			m_pathFlags.write(ipath, (byte) (pf | PathFlags.enumClosed));
  			// if (m_segmentFlags)
  			// {
  			// m_segmentFlags.write(m_pointCount - 1,
  			// (byte)SegmentFlags.LineSeg));
  			// m_segmentParamIndex.write(m_pointCount - 1, -1);
  			// }
  		}
  	}
docs: Closes all open curves by adding an implicit line segment from the end
  point to the start point.