pub struct Tileset<P = Pixels> { /* private fields */ }
Expand description
A set of tiles of the same size.
In the GUI, this is the collection of tiles that you build up in the side bar. Each tile has the same size and is identified by an Id.
See official docs for tilemaps and tilesets for details.
Implementations§
source§impl<P> Tileset<P>
impl<P> Tileset<P>
sourcepub fn empty_tile_is_id_zero(&self) -> bool
pub fn empty_tile_is_id_zero(&self) -> bool
From the Aseprite file spec: When true, tilemaps using this tileset use tile ID=0 as empty tile. In rare cases this is false, the empty tile will be equal to 0xffffffff (used in internal versions of Aseprite).
sourcepub fn tile_count(&self) -> u32
pub fn tile_count(&self) -> u32
Number of tiles.
sourcepub fn base_index(&self) -> i16
pub fn base_index(&self) -> i16
Number to show in the UI for the tile with index=0. Default is 1. Only used for Aseprite UI purposes. Not used for data representation.
sourcepub fn external_file(&self) -> Option<&ExternalTilesetReference>
pub fn external_file(&self) -> Option<&ExternalTilesetReference>
When non-empty, describes a link to an external file.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for Tileset<P>where
P: Freeze,
impl<P> RefUnwindSafe for Tileset<P>where
P: RefUnwindSafe,
impl<P> Send for Tileset<P>where
P: Send,
impl<P> Sync for Tileset<P>where
P: Sync,
impl<P> Unpin for Tileset<P>where
P: Unpin,
impl<P> UnwindSafe for Tileset<P>where
P: UnwindSafe,
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