Type Alias graphics::types::SourceRectangle

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

[x, y, w, h]

Trait Implementations§

source§

impl SourceRectangled for SourceRectangle

source§

fn src_rect(self, x: Scalar, y: Scalar, w: Scalar, h: Scalar) -> Self

Adds a source rectangle.
source§

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

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

fn src_flip_h(self) -> Self

Flips the source rectangle horizontally.
source§

fn src_flip_v(self) -> Self

Flips the source rectangle vertically.
source§

fn src_flip_hv(self) -> Self

Flips the source rectangle horizontally and vertically.