pub struct ScreenRect<S = f32> {
pub x: S,
pub y: S,
pub width: S,
pub height: S,
}Expand description
A rectangle in screen/pixel coordinates.
Represents a rectangular region on the display, with position and size measured in pixels.
§Fields
x: X coordinate of the top-left cornery: Y coordinate of the top-left cornerwidth: Width in pixelsheight: Height in pixels
Fields§
§x: SX coordinate of the top-left corner in pixels.
y: SY coordinate of the top-left corner in pixels.
width: SWidth of the rectangle in pixels.
height: SHeight of the rectangle in pixels.
Trait Implementations§
Source§impl<S: Clone> Clone for ScreenRect<S>
impl<S: Clone> Clone for ScreenRect<S>
Source§fn clone(&self) -> ScreenRect<S>
fn clone(&self) -> ScreenRect<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for ScreenRect<S>
impl<S: Debug> Debug for ScreenRect<S>
impl<S: Copy> Copy for ScreenRect<S>
Auto Trait Implementations§
impl<S> Freeze for ScreenRect<S>where
S: Freeze,
impl<S> RefUnwindSafe for ScreenRect<S>where
S: RefUnwindSafe,
impl<S> Send for ScreenRect<S>where
S: Send,
impl<S> Sync for ScreenRect<S>where
S: Sync,
impl<S> Unpin for ScreenRect<S>where
S: Unpin,
impl<S> UnwindSafe for ScreenRect<S>where
S: UnwindSafe,
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