rast_tiling — pure tile-grid geometry.
Splits a Width × Height raster into a regular grid of TileW × TileH
tiles. Right/bottom edge tiles are clipped to the raster bounds (partial
tiles), so every pixel is covered exactly once and no tile reads out of
bounds.
tile() = #{x := non_neg_integer(), y := non_neg_integer(), w := pos_integer(), h := pos_integer()}
| tile_count/4 | Number of tiles covering a Width × Height raster with TileW ×
TileH tiles (edge tiles included). |
| tile_grid/4 | List every tile window, row-major (left-to-right, top-to-bottom). |
tile_count(Width::pos_integer(), Height::pos_integer(), TileW::pos_integer(), TileH::pos_integer()) -> non_neg_integer()
Number of tiles covering a Width × Height raster with TileW ×
TileH tiles (edge tiles included).
tile_grid(Width::pos_integer(), Height::pos_integer(), TileW::pos_integer(), TileH::pos_integer()) -> [tile()]
List every tile window, row-major (left-to-right, top-to-bottom).
Each tile is #{x, y, w, h} in pixel coordinates; edge tiles are clipped.
Generated by EDoc