docs: public int addGroup(double x, double y) {
  		int pointIndex;
  		if (this.pointCoordinates == null) {
  			this.pointCoordinates = new double[] {x, y};
  			this.partIndexes = null;
  			pointIndex = 0;
  		} else {
  			double[] pts = new double[this.pointCoordinates.length + 2];
  			System.arraycopy(this.pointCoordinates, 0, pts, 0, this.pointCoordinates.length);
  			pointIndex = pts.length - 2;
  			pts[pointIndex] = x;
  			pts[pointIndex + 1] = y;
  
  			final int groupCount = getGroupCount();
  			int[] grps = new int[groupCount];
  			if (this.partIndexes != null) {
  				System.arraycopy(this.partIndexes, 0, grps, 0, groupCount - 1);
  			}
  			grps[groupCount - 1] = pointIndex;
  
  			this.pointCoordinates = pts;
  			pts = null;
  
  			this.partIndexes = grps;
  			grps = null;
  
  			pointIndex /= 2;
  		}
  
  		fireShapeChanged();
  		fireElementChanged();
  
  		return pointIndex;
  	}