pub struct Tilemap<'a> { /* private fields */ }
Expand description
A reference to a tilemap.
A tilemap describes an image as a collection of tiles from a Tileset.
Every non-empty cel in a tilemap layer corresponds to one tilemap.
Implementations§
source§impl<'a> Tilemap<'a>
impl<'a> Tilemap<'a>
sourcepub fn tile(&self, x: u32, y: u32) -> &Tile
pub fn tile(&self, x: u32, y: u32) -> &Tile
Lookup tile at given location.
Tile coordinates start at (0, 0) in the top left.
Note: Aseprite as of 1.3-beta5 labels tile coordinates relative to the
tile offsets. I.e., if your first column is empty, then the GUI shows
-1
for the x coordinate of the top-left tile.
sourcepub fn tile_offsets(&self) -> (i32, i32)
pub fn tile_offsets(&self) -> (i32, i32)
Describes first not-empty tile.
sourcepub fn pixel_offsets(&self) -> (i32, i32)
pub fn pixel_offsets(&self) -> (i32, i32)
Describes first non-empty tile in pixel offsets.
Auto Trait Implementations§
impl<'a> Freeze for Tilemap<'a>
impl<'a> RefUnwindSafe for Tilemap<'a>
impl<'a> Send for Tilemap<'a>
impl<'a> Sync for Tilemap<'a>
impl<'a> Unpin for Tilemap<'a>
impl<'a> UnwindSafe for Tilemap<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more