/** * store info: this region is divided into a raster of even cells <br> * a preparation for using getCell()<br> * adjusted to a minimum cell size of 5 x 5 pixels * * @param r number of rows * @param c number of columns * @return the topleft cell */ public Region setRaster(int r, int c) { rows = Math.max(1, r); cols = Math.max(1, c); rowH = h / rows; if (rowH < spanMin) { rowH = spanMin; rows = h / rowH; } rowHd = h - rows * rowH; colW = w / cols; if (colW < spanMin) { colW = spanMin; cols = w / colW; } colWd = w - cols * colW; return getCell(0, 0); }
return r.getCell(pRow, pCol).getRect(); return r.getRow(pRow).getRect(); return r.getCell(pRow, pCol).getRect(); return r.getCell(1, 1).union(r.getCell(2, 2)).getRect(); return r.getCell(0, 1).union(r.getCell(3, 2)).getRect(); } else if (pCol > 3) { return r.getCell(1, 0).union(r.getCell(2, 3)).getRect(); return r.getCell(pRow, pCol).getRect();