RectExt

Trait RectExt 

Source
pub trait RectExt {
    // Required methods
    fn centered(self, other: Rect) -> Rect;
    fn scaled(self, x_scale: f64, y_scale: f64) -> Rect;
}

Required Methods§

Source

fn centered(self, other: Rect) -> Rect

Calculates a rectangle centered on self, with the same size as other.

Width and height of other rectangle are truncated to that of self

Source

fn scaled(self, x_scale: f64, y_scale: f64) -> Rect

Calculates a rectangle with a new height and width

Implementations on Foreign Types§

Source§

impl RectExt for Rect

Source§

fn centered(self, other: Rect) -> Rect

Source§

fn scaled(self, x_scale: f64, y_scale: f64) -> Rect

Implementors§