Skip to content
fill_arcs_aa

fill_arcs_aa

Mojo function 🡭

fill_arcs_aa

fn def fill_arcs_aa(mut canvas: Canvas, centers: List[FPoint], radius: Float64, start_angle: Float64, end_angle: Float64, color: Color)

Fill many equal-size anti-aliased wedges in one call.

Output is identical to calling fill_arc_aa once per centre in the same order, including where translucent wedges overlap: each band walks the batch in submission order, and bands own disjoint rows.

A transform that rotates or is not a similarity falls back to one call per centre, since the sweep angles are shared by the batch and a rotation would move them per wedge.

Args:

  • canvas (Canvas): Canvas drawn on.
  • centers (List[FPoint]): Wedge centres, in user space.
  • radius (Float64): Radius shared by every wedge.
  • start_angle (Float64): Start of the sweep, radians, shared.
  • end_angle (Float64): End of the sweep, radians, shared.
  • color (Color): Fill colour for every wedge.

Raises:

Error: Propagated from the per-wedge path.

fn def fill_arcs_aa(mut canvas: Canvas, centers: List[FPoint], radius: Float64, start_angle: Float64, end_angle: Float64, colors: List[Color])

fill_arcs_aa with a colour per wedge.

Args:

  • canvas (Canvas): Canvas drawn on.
  • centers (List[FPoint]): Wedge centres, in user space.
  • radius (Float64): Radius shared by every wedge.
  • start_angle (Float64): Start of the sweep, radians, shared.
  • end_angle (Float64): End of the sweep, radians, shared.
  • colors (List[Color]): One colour per centre; must be the same length.

Raises:

Error: If colors is not the same length as centers, or propagated from the per-wedge path.