pub trait Scanline {
// Required methods
fn reset_spans(&mut self);
fn add_cell(&mut self, x: i32, cover: u32);
fn add_span(&mut self, x: i32, len: u32, cover: u32);
fn finalize(&mut self, y: i32);
fn num_spans(&self) -> u32;
fn y(&self) -> i32;
}Expand description
Trait for scanline containers that accumulate coverage data.
Implementations include ScanlineU8 (unpacked per-pixel coverage),
ScanlineP8 (packed/RLE), and ScanlineBin (binary, no coverage).
Required Methods§
Sourcefn reset_spans(&mut self)
fn reset_spans(&mut self)
Prepare for a new scanline, clearing all span data.
Sourcefn add_cell(&mut self, x: i32, cover: u32)
fn add_cell(&mut self, x: i32, cover: u32)
Add a single cell at position x with coverage cover.