Trait graphics::Rectangled

source ·
pub trait Rectangled: Sized {
    // Required methods
    fn margin(self, m: Scalar) -> Self;
    fn rel(self, x: Scalar, y: Scalar) -> Self;

    // Provided method
    fn expand(self, m: Scalar) -> Self { ... }
}
Expand description

Should be implemented by contexts that have rectangle information.

Required Methods§

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.

Provided Methods§

source

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

Expands the current rectangle equally by all sides.

Implementors§