pub struct SourceRect {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
}Expand description
A rectangle in texels, as a sprite’s source.
Deliberately not the canvas Rect, which is in user space: a sheet
rectangle and a destination rectangle are different things, and the one
mistake this call invites is passing one where the other belongs.
Fields§
§x: f32§y: f32§width: f32§height: f32Implementations§
Trait Implementations§
Source§impl Clone for SourceRect
impl Clone for SourceRect
Source§fn clone(&self) -> SourceRect
fn clone(&self) -> SourceRect
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 SourceRect
Source§impl Debug for SourceRect
impl Debug for SourceRect
Source§impl PartialEq for SourceRect
impl PartialEq for SourceRect
impl StructuralPartialEq for SourceRect
Auto Trait Implementations§
impl Freeze for SourceRect
impl RefUnwindSafe for SourceRect
impl Send for SourceRect
impl Sync for SourceRect
impl Unpin for SourceRect
impl UnsafeUnpin for SourceRect
impl UnwindSafe for SourceRect
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