Skip to main content

ImagePatternSource

Trait ImagePatternSource 

Source
pub trait ImagePatternSource {
    // Required methods
    fn width(&self) -> f64;
    fn height(&self) -> f64;
    fn pixel(&self, x: i32, y: i32) -> Rgba8;
}
Expand description

Trait for image pattern sources.

Any type implementing this can be used as input to LineImagePattern::create(). The C++ equivalent uses a template parameter with width(), height(), pixel().

Required Methods§

Source

fn width(&self) -> f64

Source

fn height(&self) -> f64

Source

fn pixel(&self, x: i32, y: i32) -> Rgba8

Implementors§