Struct tiny_skia::IntRect [−][src]
An integer rectangle.
Guarantees
- Width and height are in 1..=i32::MAX range.
- x+width and y+height does not overflow.
Implementations
impl IntRect[src]
pub fn from_xywh(x: i32, y: i32, width: u32, height: u32) -> Option<Self>[src]
Creates a new IntRect.
pub fn from_ltrb(left: i32, top: i32, right: i32, bottom: i32) -> Option<Self>[src]
Creates a new IntRect.
pub fn x(&self) -> i32[src]
Returns rect’s X position.
pub fn y(&self) -> i32[src]
Returns rect’s Y position.
pub fn width(&self) -> u32[src]
Returns rect’s width.
pub fn height(&self) -> u32[src]
Returns rect’s height.
pub fn left(&self) -> i32[src]
Returns rect’s left edge.
pub fn top(&self) -> i32[src]
Returns rect’s top edge.
pub fn right(&self) -> i32[src]
Returns rect’s right edge.
pub fn bottom(&self) -> i32[src]
Returns rect’s bottom edge.
pub fn to_rect(&self) -> Rect[src]
Converts into Rect.
Trait Implementations
impl Clone for IntRect[src]
impl Copy for IntRect[src]
impl Debug for IntRect[src]
impl PartialEq<IntRect> for IntRect[src]
impl StructuralPartialEq for IntRect[src]
Auto Trait Implementations
impl RefUnwindSafe for IntRect
impl Send for IntRect
impl Sync for IntRect
impl Unpin for IntRect
impl UnwindSafe for IntRect
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,