Skip to main content

Rastive

Trait Rastive 

Source
pub trait Rastive {
    // Required methods
    fn reset(&mut self, min: FixedPoint, max: FixedPoint);
    fn bounds(&self) -> (FixedPoint, FixedPoint);
    fn store(&mut self, x: i32, y: i32, area: i32, cover: i32);
    fn cells(&self) -> &[Cell];
    fn lines(&self) -> &[i32];

    // Provided methods
    fn non_zero(&self, mask: &mut dyn Maskive) { ... }
    fn even_odd(&self, mask: &mut dyn Maskive) { ... }
    fn rasterize(&self, rule: FillRule, mask: &mut dyn Maskive) { ... }
}
Expand description

A trait for rasterization operations.

Required Methods§

Source

fn reset(&mut self, min: FixedPoint, max: FixedPoint)

Resets the rasterizer with new bounds.

Source

fn bounds(&self) -> (FixedPoint, FixedPoint)

Gets the current bounds of the rasterizer.

Source

fn store(&mut self, x: i32, y: i32, area: i32, cover: i32)

Stores a cell with coverage information.

Source

fn cells(&self) -> &[Cell]

Gets the list of cells.

Source

fn lines(&self) -> &[i32]

Gets the line indices.

Provided Methods§

Source

fn non_zero(&self, mask: &mut dyn Maskive)

Rasterizes using non-zero fill rule.

Source

fn even_odd(&self, mask: &mut dyn Maskive)

Rasterizes using even-odd fill rule.

Source

fn rasterize(&self, rule: FillRule, mask: &mut dyn Maskive)

Rasterizes the path with the specified fill rule.

Implementors§

Source§

impl Rastive for VecStorage

Source§

impl<const MAX_BAND: usize, const MAX_CELLS: usize> Rastive for ArrayStorage<MAX_BAND, MAX_CELLS>