pub struct RectGeometry {
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
}Expand description
2D rectangle in logical desktop coordinates.
Fields§
§x: i32Horizontal offset from desktop origin in DIPs.
y: i32Vertical offset from desktop origin in DIPs.
width: u32Width in DIPs.
height: u32Height in DIPs.
Implementations§
Source§impl RectGeometry
impl RectGeometry
Sourcepub const MIN_HEIGHT: u32 = 150
pub const MIN_HEIGHT: u32 = 150
Minimum height allowed for a window.
Sourcepub fn ensure_minimum_size(&self) -> Self
pub fn ensure_minimum_size(&self) -> Self
Clamps width and height to safe non-degenerate minimum dimensions.
Trait Implementations§
Source§impl Clone for RectGeometry
impl Clone for RectGeometry
impl Copy for RectGeometry
Source§impl Debug for RectGeometry
impl Debug for RectGeometry
impl Eq for RectGeometry
Source§impl PartialEq for RectGeometry
impl PartialEq for RectGeometry
impl StructuralPartialEq for RectGeometry
Auto Trait Implementations§
impl Forget for RectGeometry
impl Freeze for RectGeometry
impl Move for RectGeometry
impl RefUnwindSafe for RectGeometry
impl Send for RectGeometry
impl Sync for RectGeometry
impl Unpin for RectGeometry
impl UnsafeUnpin for RectGeometry
impl UnwindSafe for RectGeometry
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