docs: public void insertPath(int pathIndex, MultiPathImpl src, int srcPathIndex,
  			boolean bForward) {
  		if (src == this)
  			throw new IllegalArgumentException();
  
  		if (srcPathIndex >= src.getPathCount())
  			throw new IllegalArgumentException();
  
  		int oldPathCount = getPathCount();
  		if (pathIndex > oldPathCount)
  			throw new IllegalArgumentException();
  
  		if (pathIndex < 0)
  			pathIndex = oldPathCount;
  
  		if (srcPathIndex < 0)
  			srcPathIndex = src.getPathCount() - 1;
  
  		m_bPathStarted = false;
  
  		mergeVertexDescription(src.m_description);// merge attributes from the
  													// source
  
  		src._verifyAllStreams();// the source need to be correct.
  
  		int srcPathIndexStart = src.getPathStart(srcPathIndex);
  		int srcPathSize = src.getPathSize(srcPathIndex);
  		int oldPointCount = m_pointCount;
  		int offset = src.isClosedPath(srcPathIndex) && !bForward ? 1 : 0;
  
  		_resizeImpl(m_pointCount + srcPathSize);
  		_verifyAllStreams();
  		int pathIndexStart = pathIndex < oldPathCount ? getPathStart(pathIndex)
  				: oldPointCount;
  
  		// Copy all attribute values.
  		for (int iattr = 0, nattr = m_description.getAttributeCount(); iattr < nattr; iattr++) {
  			int semantics = m_description._getSemanticsImpl(iattr);
  			int isrcAttr = src.m_description.getAttributeIndex(semantics);
  
  			int comp = VertexDescription.getComponentCount(semantics);
  
  			if (isrcAttr >= 0 && src.m_vertexAttributes[isrcAttr] != null) {
  				if (offset != 0)
  					m_vertexAttributes[iattr].insertRange(
  							pathIndexStart * comp,
  							src.m_vertexAttributes[isrcAttr], comp
  									* srcPathIndexStart, comp, true, comp, comp
  									* oldPointCount);
  				m_vertexAttributes[iattr].insertRange((pathIndexStart + offset)
  						* comp, src.m_vertexAttributes[isrcAttr], comp
  						* (srcPathIndexStart + offset), comp
  						* (srcPathSize - offset), bForward, comp, comp
  						* (oldPointCount + offset));
  			} else {
  				// Need to make room for the attributes, so we copy default
  				// values in
  
  				double v = VertexDescription.getDefaultValue(semantics);
  				m_vertexAttributes[iattr].insertRange(pathIndexStart * comp, v,
  						comp * srcPathSize, comp * oldPointCount);
  			}
  		}
  
  		int newPointCount = oldPointCount + srcPathSize;
  		m_paths.add(newPointCount);
  
  		for (int ipath = oldPathCount; ipath >= pathIndex + 1; ipath--) {
  			int iend = m_paths.read(ipath - 1);
  			m_paths.write(ipath, iend + srcPathSize);
  		}
  
  		// ========================== todo: NonLinearSegments =================
  		if (src.hasNonLinearSegments(srcPathIndex)) {
  
  		}
  
  		m_pathFlags.add((byte) 0);
  
  		// _ASSERT(m_pathFlags.size() == m_paths.size());
  
  		for (int ipath = oldPathCount - 1; ipath >= pathIndex + 1; ipath--) {
  			byte flags = m_pathFlags.read(ipath);
  			flags &= ~(byte) PathFlags.enumCalcMask;// remove calculated flags
  			m_pathFlags.write(ipath + 1, flags);
  		}
  
  		AttributeStreamOfInt8 srcPathFlags = src.getPathFlagsStreamRef();
  		byte flags = srcPathFlags.read(srcPathIndex);
  		flags &= ~(byte) PathFlags.enumCalcMask;// remove calculated flags
  
  		if (m_bPolygon)
  			flags |= (byte) PathFlags.enumClosed;
  
  		m_pathFlags.write(pathIndex, flags);
  	}