Skip to main content

encode_tiles

Function encode_tiles 

Source
pub fn encode_tiles(tiles: &[Tile], use_atlas: bool, use_geom: bool) -> Vec<u8> ⓘ
Expand description

Encode a tile stream (row-major, tile_dims shapes) with optional atlas matching. Raw bytes per tile: mode, optional idx, optional transform, body; mode 2 (geometric atlas, v0.6) writes both index (u32 LE) and transform id (u8) after the mode byte. use_geom extends matching to the D8 group; with use_atlas only, exact prior-patch references (v0.5 behavior) are used.