pub struct Sprite { /* private fields */ }
Implementations§
Source§impl Sprite
impl Sprite
pub fn from_path<P: AsRef<Path>>( context: &mut Context, path: P, size: f32, ) -> Self
pub fn from_path_rect<P: AsRef<Path>>( context: &mut Context, path: P, size: Size<f32>, ) -> Self
pub fn from_mesh(mesh: RMesh) -> Self
pub fn is_same(&self, other: &Self) -> bool
pub fn pos(&self) -> Point
pub fn set_pos(&mut self, pos: Point)
pub fn set_color(&mut self, color: [f32; 4])
pub fn color(&self) -> [f32; 4]
pub fn size(&self) -> Size<f32>
pub fn draw(&self, context: &mut Context, parent_matrix: Matrix4<f32>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sprite
impl !RefUnwindSafe for Sprite
impl !Send for Sprite
impl !Sync for Sprite
impl Unpin for Sprite
impl !UnwindSafe for Sprite
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)