pub struct ImageRect {
pub x: i32,
pub y: i32,
pub width: i32,
pub height: i32,
}Expand description
Indicates which part of an image should be used for a certain tile.
Corresponds to the tile’s x, y, width and height attributes.
Fields§
§x: i32The X position of the sub-rectangle representing this tile (default: 0)
y: i32The Y position of the sub-rectangle representing this tile (default: 0)
width: i32The width of the sub-rectangle representing this tile (defaults to the image width)
height: i32The height of the sub-rectangle representing this tile (defaults to the image height)
Trait Implementations§
impl Copy for ImageRect
impl StructuralPartialEq for ImageRect
Auto Trait Implementations§
impl Freeze for ImageRect
impl RefUnwindSafe for ImageRect
impl Send for ImageRect
impl Sync for ImageRect
impl Unpin for ImageRect
impl UnwindSafe for ImageRect
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