[][src]Struct ttf_utils::BBox

pub struct BBox {
    pub x_min: f32,
    pub y_min: f32,
    pub x_max: f32,
    pub y_max: f32,
}

A bounding box.

Fields

x_min: f32

Minimum X coordinate.

y_min: f32

Minimum Y coordinate.

x_max: f32

Maximum X coordinate.

y_max: f32

Maximum Y coordinate.

Implementations

impl BBox[src]

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

Returns the bbox width.

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

Returns the bbox height.

pub fn extend_by(&mut self, x: f32, y: f32)[src]

Extend the bbox.

Trait Implementations

impl Clone for BBox[src]

impl Copy for BBox[src]

impl Debug for BBox[src]

impl Default for BBox[src]

impl PartialEq<BBox> for BBox[src]

impl StructuralPartialEq for BBox[src]

Auto Trait Implementations

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.