Struct rasterize::BBox[][src]

pub struct BBox { /* fields omitted */ }

Bounding box with sides directed along the axes

Implementations

impl BBox[src]

pub fn new(p0: impl Into<Point>, p1: impl Into<Point>) -> Self[src]

Construct bounding box which includes points p0 and p1

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

Point with minmum values of x and y coordianetes

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

Point with minmum values of x and y coordianetes

pub fn x(&self) -> Scalar[src]

x coordinate of the point with the minimal value

pub fn y(&self) -> Scalar[src]

y coordinate of the point with the minimal value

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

Width of the bounding box

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

Hight of the bounding box

pub fn diag(&self) -> Line[src]

Diagonal line from min to max of the bounding box

pub fn contains(&self, point: Point) -> bool[src]

Determine if the point is inside of the bounding box

pub fn extend(&self, point: Point) -> Self[src]

Extend bounding box so it would contains provided point

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

Create bounding box the spans both bbox-es

pub fn union_opt(&self, other: Option<BBox>) -> Self[src]

pub fn intersect(&self, other: BBox) -> Option<BBox>[src]

Find bounding box of the intersection of two bounding boxes

pub fn unit_transform(&self) -> Transform[src]

Transform that makes bbox a unit-sized square

This is used by clip|mask|gradient units

Trait Implementations

impl Clone for BBox[src]

impl Copy for BBox[src]

impl Debug for BBox[src]

Auto Trait Implementations

impl RefUnwindSafe for BBox

impl Send for BBox

impl Sync for BBox

impl Unpin for BBox

impl UnwindSafe for BBox

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.