fill_ring_sector_aa
Mojo function 🡭
fill_ring_sector_aa
fn def fill_ring_sector_aa(mut canvas: Canvas, cx: Float64, cy: Float64, inner_radius: Float64, outer_radius: Float64, start_angle: Float64, end_angle: Float64, color: Color, supersample: Int = Int(4))Anti-aliased fill_ring_sector: fill_arc_aa’s per-sample technique plus a second radius test, both of which must pass.
Scans the union of _arc_bounds’ boxes for the outer and inner
radii, both with no center point; the outer radius alone is not
enough.
Args:
- canvas (
Canvas): Canvas to fill into. - cx (
Float64): Center x. - cy (
Float64): Center y. - inner_radius (
Float64): Ring’s inner edge, in pixels. - outer_radius (
Float64): Ring’s outer edge, in pixels. Must exceed inner_radius. - start_angle (
Float64): Sweep start, radians, 0 pointing along +x. - end_angle (
Float64): Sweep end, radians. Must be >= start_angle. - color (
Color): Fill color. - supersample (
Int): Sub-pixel grid side length per pixel (N -> N*N samples).