pub struct SpriteFrame { /* private fields */ }Expand description
Defines a single frame in a sprite animation.
Implementations§
Source§impl SpriteFrame
impl SpriteFrame
pub fn get_source(&self) -> Rect
pub fn get_mut_source(&mut self) -> &mut Rect
pub fn set_source(&mut self, val: Rect) -> &mut Self
pub fn get_duration(&self) -> f64
pub fn get_mut_duration(&mut self) -> &mut f64
pub fn set_duration(&mut self, val: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for SpriteFrame
impl Clone for SpriteFrame
Source§fn clone(&self) -> SpriteFrame
fn clone(&self) -> SpriteFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpriteFrame
Source§impl Debug for SpriteFrame
impl Debug for SpriteFrame
Source§impl Default for SpriteFrame
impl Default for SpriteFrame
Source§fn default() -> SpriteFrame
fn default() -> SpriteFrame
Returns the “default value” for a type. Read more
Source§impl PartialEq for SpriteFrame
impl PartialEq for SpriteFrame
Source§fn eq(&self, other: &SpriteFrame) -> bool
fn eq(&self, other: &SpriteFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SpriteFrame
impl PartialOrd for SpriteFrame
impl StructuralPartialEq for SpriteFrame
Auto Trait Implementations§
impl Freeze for SpriteFrame
impl RefUnwindSafe for SpriteFrame
impl Send for SpriteFrame
impl Sync for SpriteFrame
impl Unpin for SpriteFrame
impl UnsafeUnpin for SpriteFrame
impl UnwindSafe for SpriteFrame
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