pub struct ScreenRect {
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
}Expand description
Um retângulo da tela em pixels físicos (a área de trabalho, como o sistema dá).
Fields§
§x: i32§y: i32§width: u32§height: u32Implementations§
Source§impl ScreenRect
impl ScreenRect
pub const fn new(x: i32, y: i32, width: u32, height: u32) -> Self
pub fn right(&self) -> i64
pub fn bottom(&self) -> i64
pub fn is_empty(&self) -> bool
Sourcepub fn intersect(&self, other: ScreenRect) -> Option<ScreenRect>
pub fn intersect(&self, other: ScreenRect) -> Option<ScreenRect>
A parte comum (None se não se tocam).
Sourcepub fn contains_rect(&self, other: ScreenRect) -> bool
pub fn contains_rect(&self, other: ScreenRect) -> bool
other cabe inteiro neste.
Sourcepub fn bounding(rects: &[ScreenRect]) -> Option<ScreenRect>
pub fn bounding(rects: &[ScreenRect]) -> Option<ScreenRect>
O menor retângulo que contém todos (None sem nenhum): o form em tela cheia em todos
os monitores.
Trait Implementations§
Source§impl Clone for ScreenRect
impl Clone for ScreenRect
impl Copy for ScreenRect
Source§impl Debug for ScreenRect
impl Debug for ScreenRect
Source§impl Default for ScreenRect
impl Default for ScreenRect
impl Eq for ScreenRect
Source§impl Hash for ScreenRect
impl Hash for ScreenRect
Source§impl PartialEq for ScreenRect
impl PartialEq for ScreenRect
impl StructuralPartialEq for ScreenRect
Auto Trait Implementations§
impl Forget for ScreenRect
impl Freeze for ScreenRect
impl Move for ScreenRect
impl RefUnwindSafe for ScreenRect
impl Send for ScreenRect
impl Sync for ScreenRect
impl Unpin for ScreenRect
impl UnsafeUnpin for ScreenRect
impl UnwindSafe for ScreenRect
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