Struct mupdf_sys::fz_rect[][src]

#[repr(C)]pub struct fz_rect {
    pub x0: f32,
    pub y0: f32,
    pub x1: f32,
    pub y1: f32,
}

fz_rect is a rectangle represented by two diagonally opposite corners at arbitrary coordinates.

Rectangles are always axis-aligned with the X- and Y- axes. The relationship between the coordinates are that x0 <= x1 and y0 <= y1 in all cases except for infinite rectangles. The area of a rectangle is defined as (x1 - x0) * (y1 - y0). If either x0 > x1 or y0 > y1 is true for a given rectangle then it is defined to be infinite.

To check for empty or infinite rectangles use fz_is_empty_rect and fz_is_infinite_rect.

x0, y0: The top left corner.

x1, y1: The bottom right corner.

Fields

x0: f32y0: f32x1: f32y1: f32

Trait Implementations

impl Clone for fz_rect[src]

impl Copy for fz_rect[src]

impl Debug for fz_rect[src]

Auto Trait Implementations

impl RefUnwindSafe for fz_rect

impl Send for fz_rect

impl Sync for fz_rect

impl Unpin for fz_rect

impl UnwindSafe for fz_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, 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.