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§
fn width(&self) -> f64
fn height(&self) -> f64
fn pixel(&self, x: i32, y: i32) -> Rgba8
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".