[−][src]Struct resvg::ScreenRect
A 2D screen rect representation.
Fields
x: i32y: i32width: u32height: u32Methods
impl ScreenRect[src]
pub fn new(x: i32, y: i32, width: u32, height: u32) -> Self[src]
Creates a new Rect from values.
pub fn size(&self) -> ScreenSize[src]
Returns rect's size.
pub fn left(&self) -> i32[src]
Returns rect's left edge position.
pub fn right(&self) -> i32[src]
Returns rect's right edge position.
pub fn top(&self) -> i32[src]
Returns rect's top edge position.
pub fn bottom(&self) -> i32[src]
Returns rect's bottom edge position.
pub fn contains(&self, x: i32, y: i32) -> bool[src]
Checks that rect contains a point.
pub fn fit_to_rect(&self, bounds: ScreenRect) -> Self[src]
Fits the current rect into the specified bounds.
pub fn to_rect(&self) -> Rect[src]
Converts into Rect.
pub fn is_valid(&self) -> bool[src]
Checks that the rect has a valid size.
Trait Implementations
impl Copy for ScreenRect[src]
impl PartialEq<ScreenRect> for ScreenRect[src]
fn eq(&self, other: &ScreenRect) -> bool[src]
fn ne(&self, other: &ScreenRect) -> bool[src]
impl From<(i32, i32, u32, u32)> for ScreenRect[src]
impl Clone for ScreenRect[src]
fn clone(&self) -> ScreenRect[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Display for ScreenRect[src]
impl Debug for ScreenRect[src]
Auto Trait Implementations
impl Send for ScreenRect
impl Sync for ScreenRect
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,