pub struct SpriteImage { /* private fields */ }Implementations§
Source§impl SpriteImage
impl SpriteImage
pub fn handle(&self) -> ImageHandle
pub fn source_rect(&self) -> ImageSourceRect
pub fn size(&self) -> [f32; 2]
pub fn origin(&self) -> [f32; 2]
pub fn anchor(&self) -> [f32; 2]
pub fn duration(&self) -> f32
pub fn view(&self, modifier: Modifier) -> View
pub fn control_visual(&self, tint: Color) -> ControlVisual
pub fn rotated_control_visual( &self, tint: Color, quarter_turns: i32, ) -> ControlVisual
pub fn prefix_control_visual(&self, tint: Color) -> ControlVisual
pub fn subimage(&self, source_rect: ImageSourceRect) -> Option<Self>
pub fn relative_subimage( &self, x: u32, y: u32, width: u32, height: u32, ) -> Option<Self>
Trait Implementations§
Source§impl Clone for SpriteImage
impl Clone for SpriteImage
Auto Trait Implementations§
impl Freeze for SpriteImage
impl RefUnwindSafe for SpriteImage
impl Send for SpriteImage
impl Sync for SpriteImage
impl Unpin for SpriteImage
impl UnsafeUnpin for SpriteImage
impl UnwindSafe for SpriteImage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.