private void wrap(int[] cellXY, BoundSize gapSize)
	{
		boolean flowx = lc.isFlowX();
		cellXY[0] = flowx ? 0 : cellXY[0] + 1;
		cellXY[1] = flowx ? cellXY[1] + 1 : 0;

		if (gapSize != null) {
			if (wrapGapMap == null)
				wrapGapMap = new HashMap<Integer, BoundSize>(8);

			wrapGapMap.put(cellXY[flowx ? 1 : 0], gapSize);
		}

		// add the row/column so that the gap in the last row/col will not be removed.
		if (flowx) {
			rowIndexes.add(cellXY[1]);
		} else {
			colIndexes.add(cellXY[0]);
		}
	}