pub trait SourceRectangled {
    // Required methods
    fn src_rect(self, x: f64, y: f64, w: f64, h: f64) -> Self;
    fn src_rel(self, x: f64, y: f64) -> Self;
    fn src_flip_h(self) -> Self;
    fn src_flip_v(self) -> Self;
    fn src_flip_hv(self) -> Self;
}
Expand description

Should be implemented by contexts that have source rectangle information.

Required Methods§

source

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

Adds a source rectangle.

source

fn src_rel(self, x: f64, y: f64) -> 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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SourceRectangled for [f64; 4]

source§

fn src_rect(self, x: f64, y: f64, w: f64, h: f64) -> [f64; 4]

source§

fn src_rel(self, x: f64, y: f64) -> [f64; 4]

source§

fn src_flip_h(self) -> [f64; 4]

source§

fn src_flip_v(self) -> [f64; 4]

source§

fn src_flip_hv(self) -> [f64; 4]

Implementors§