pub struct AtlasSprite { /* private fields */ }Expand description
A sprite of an atlas: an image, a sheet of frames, an Aseprite export, or a tile set.
Implementations§
Source§impl AtlasSprite
impl AtlasSprite
Sourcepub fn frames(&self) -> &[AtlasFrame]
pub fn frames(&self) -> &[AtlasFrame]
Its frames, in the sheet’s order: one at least.
Sourcepub fn frame(&self, index: usize) -> Option<&AtlasFrame>
pub fn frame(&self, index: usize) -> Option<&AtlasFrame>
Frame index.
Sourcepub fn pivot(&self) -> Option<Vec2>
pub fn pivot(&self) -> Option<Vec2>
Its pivot, in its untrimmed frame’s pixels, from (0, 0) at the
top-left corner: None for a tile set.
Sourcepub fn tile_size(&self) -> Option<UVec2>
pub fn tile_size(&self) -> Option<UVec2>
A tile’s width and height in pixels, if it is a tile set.
Sourcepub fn clips(&self) -> &[AtlasClip]
pub fn clips(&self) -> &[AtlasClip]
Its clips, in byte order of their names: none for a tile set, or for a sprite that is not an Aseprite export with tags.
Trait Implementations§
Source§impl Clone for AtlasSprite
impl Clone for AtlasSprite
Source§impl Debug for AtlasSprite
impl Debug for AtlasSprite
Source§impl PartialEq for AtlasSprite
impl PartialEq for AtlasSprite
impl StructuralPartialEq for AtlasSprite
Auto Trait Implementations§
impl Forget for AtlasSprite
impl Freeze for AtlasSprite
impl Move for AtlasSprite
impl RefUnwindSafe for AtlasSprite
impl Send for AtlasSprite
impl Sync for AtlasSprite
impl Unpin for AtlasSprite
impl UnsafeUnpin for AtlasSprite
impl UnwindSafe for AtlasSprite
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