Type Alias graphics::types::Rectangle

source ·
pub type Rectangle<T = Scalar> = [T; 4];
Expand description

Rectangle dimensions: [x, y, w, h]

Trait Implementations§

source§

impl Rectangled for Rectangle

source§

fn margin(self, m: Scalar) -> Self

Shrinks the current rectangle equally by all sides.
source§

fn rel(self, x: Scalar, y: Scalar) -> Self

Moves to a relative rectangle using the current rectangle as tile.
source§

fn expand(self, m: Scalar) -> Self

Expands the current rectangle equally by all sides.