fill_path_gradient_aa
Mojo function 🡭
fill_path_gradient_aa
fn def fill_path_gradient_aa(mut canvas: Canvas, path: Path, gradient: LinearGradient, fill_rule: FillRule = FillRule.EVEN_ODD, supersample: Int = Int(4), curve_steps: Int = Int(0))Anti-aliased fill_path_gradient – fill_path_aa’s coverage with a gradient as the fill source. The hard-edged sibling leaves a staircase along every boundary that is not axis-aligned.
Args:
- canvas (
Canvas): Canvas to fill into. - path (
Path): Path to fill. - gradient (
LinearGradient): Fill source, queried per covered pixel. - fill_rule (
FillRule): EVEN_ODD (default) or NONZERO – see FillRule. - supersample (
Int): Sub-pixel grid side length per pixel (N -> N*N samples) under EVEN_ODD. A NONZERO fill rasterizes by exact area (canvas.aa_area) and ignores it. - curve_steps (
Int): Straight-line segments per quad/cubic Bezier; 0 (the default) chooses per segment.