stroke_path_aa
Mojo function 🡭
stroke_path_aa
fn def stroke_path_aa(mut canvas: Canvas, path: Path, color: Color, width: Float64 = 1, supersample: Int = Int(4), curve_steps: Int = Int(0), dashes: List[Float64] = List(), dash_offset: Float64 = 0, cap: LineCap = LineCap.ROUND, join: LineJoin = LineJoin.ROUND, miter_limit: Float64 = 4)Anti-aliased stroke_path, via draw_polyline_aa/draw_polygon_aa.
Args:
- canvas (
Canvas): Canvas to stroke into. - path (
Path): Path to stroke. - color (
Color): Stroke color. - width (
Float64): Stroke width in pixels. - supersample (
Int): Sub-pixel grid side length per pixel (N -> N*N samples) for the one stroke that still samples: a closed one whose inner ring inverts, the width being past the curve’s radius of curvature. Every other stroke rasterizes by exact area and ignores it. See_stroke_edges. - curve_steps (
Int): Straight-line segments per quad/cubic Bezier; 0 (the default) chooses per segment. - dashes (
List[Float64]): On/off segment lengths in pixels, cycled along the stroke. Empty (default) draws a solid line. - dash_offset (
Float64): Distance into the dash pattern the stroke starts at. - cap (
LineCap): How an open sub-path’s two ends are finished – see LineCap. A closed sub-path has no ends and ignores it. - join (
LineJoin): How corners are turned – see LineJoin. - miter_limit (
Float64): Ratio past which a MITER join falls back to BEVEL, as a multiple of half the stroke width.