Skip to content
fill_ellipses_aa

fill_ellipses_aa

Mojo function 🡭

fill_ellipses_aa

fn def fill_ellipses_aa(mut canvas: Canvas, centers: List[FPoint], rx: Float64, ry: Float64, color: Color)

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

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

A radius past the closed-form limit, or a canvas transform that is not a similarity, falls back to one call per center – those routes band internally already, so batching them would remove parallelism rather than add it.

Args:

  • canvas (Canvas): Canvas drawn on.
  • centers (List[FPoint]): Ellipse centres, in user space.
  • rx (Float64): Horizontal radius, shared by every ellipse.
  • ry (Float64): Vertical radius, shared by every ellipse.
  • color (Color): Fill colour for every ellipse.

Raises:

Error: Propagated from the per-ellipse path.

fn def fill_ellipses_aa(mut canvas: Canvas, centers: List[FPoint], rx: Float64, ry: Float64, colors: List[Color])

fill_ellipses_aa with a colour per marker.

Args:

  • canvas (Canvas): Canvas drawn on.
  • centers (List[FPoint]): Ellipse centres, in user space.
  • rx (Float64): Horizontal radius, shared by every ellipse.
  • ry (Float64): Vertical radius, shared by every ellipse.
  • 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-ellipse path.