[−][src]Struct openpol::image13h::Rect
Fields
left: usize
The position of the left border, inclusive.
top: usize
The position of the top border, inclusive.
width: usize
The width of the rect.
height: usize
The height of the rect.
Methods
impl Rect
[src]
pub fn from_ranges(x: Range<usize>, y: Range<usize>) -> Rect
[src]
Construct a new Rect
from coordinate ranges (exclusively-ended).
pub fn right_inclusive(&self) -> usize
[src]
Get the right-most x coordinate that's still in the rect.
pub fn beyond_right(&self) -> usize
[src]
Get the x coordinate that's one to the right of the right border of the rect.
pub fn bottom_inclusive(&self) -> usize
[src]
Get the bottom-most y coordinate that's still in the rect.
pub fn beyond_bottom(&self) -> usize
[src]
Get the y coordinate that's one below the bottom border of the rect.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
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,
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, 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.
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>,