Skip to main content

SpanConverterFunction

Trait SpanConverterFunction 

Source
pub trait SpanConverterFunction {
    type Color;

    // Required method
    fn convert(&mut self, span: &mut [Self::Color], x: i32, y: i32, len: u32);

    // Provided method
    fn prepare(&mut self) { ... }
}
Expand description

Trait for span conversion functions.

Converts a span of colors in-place. Used to post-process generated spans (e.g., applying alpha masks, color adjustments, etc.).

Required Associated Types§

Required Methods§

Source

fn convert(&mut self, span: &mut [Self::Color], x: i32, y: i32, len: u32)

Provided Methods§

Source

fn prepare(&mut self)

Implementors§