#[non_exhaustive]pub struct Placement {
pub width: u32,
pub height: u32,
pub x: u32,
pub y: u32,
pub hotspot_x: u32,
pub hotspot_y: u32,
}Expand description
Where the sprite ended up in the buffer.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: u32Size of the sprite as written, after rotation and any shrink.
height: u32As Placement::width.
x: u32Top-left corner of the sprite within the buffer.
y: u32As Placement::x.
hotspot_x: u32The hotspot, in buffer coordinates.
This is what goes in HOTSPOT_X, and what a position has to be
adjusted by: the plane is placed so the hotspot lands on the pointer,
not so its corner does.
hotspot_y: u32Trait Implementations§
impl Copy for Placement
impl Eq for Placement
impl StructuralPartialEq for Placement
Auto Trait Implementations§
impl Freeze for Placement
impl RefUnwindSafe for Placement
impl Send for Placement
impl Sync for Placement
impl Unpin for Placement
impl UnsafeUnpin for Placement
impl UnwindSafe for Placement
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