Struct mupdf::rect::Rect[][src]

pub struct Rect {
    pub x0: f32,
    pub y0: f32,
    pub x1: f32,
    pub y1: f32,
}

A rectangle represented by two diagonally opposite corners at arbitrary coordinates

Fields

x0: f32y0: f32x1: f32y1: f32

Implementations

impl Rect[src]

pub const INF: Self[src]

pub const fn new(x0: f32, y0: f32, x1: f32, y1: f32) -> Self[src]

pub fn is_empty(&self) -> bool[src]

pub fn contains(&self, x: f32, y: f32) -> bool[src]

pub fn width(&self) -> f32[src]

pub fn height(&self) -> f32[src]

pub fn origin(&self) -> Point[src]

pub fn size(&self) -> Size[src]

pub fn union(&mut self, other: Rect) -> &mut Self[src]

pub fn adjust_for_stroke(
    &self,
    stroke: &StrokeState,
    ctm: &Matrix
) -> Result<Self, Error>
[src]

Trait Implementations

impl Clone for Rect[src]

impl Copy for Rect[src]

impl Debug for Rect[src]

impl Default for Rect[src]

impl Display for Rect[src]

impl From<IRect> for Rect[src]

impl From<Quad> for Rect[src]

impl From<fz_rect> for Rect[src]

impl Into<fz_rect> for Rect[src]

impl PartialEq<Rect> for Rect[src]

impl StructuralPartialEq for Rect[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.