Skip to main content

fill_polygons

Function fill_polygons 

Source
pub fn fill_polygons(
    canvas: &mut Canvas,
    mask: &ClipMask,
    polygons: &[Vec<Point>],
    color: Color,
    even_odd: bool,
    alpha: f64,
    mode: BlendMode,
)
Expand description

Fill polygons with color, restricted to mask.

even_odd selects the even-odd rule; otherwise the non-zero winding rule applies. The scanline is sampled at pixel centres, so results are crisp and deterministic — no anti-aliasing yet.