stroke_path
Mojo function 🡭
stroke_path
fn def stroke_path(mut canvas: Canvas, path: Path, color: Color, curve_steps: Int = Int(0), dashes: List[Float64] = List(), dash_offset: Float64 = 0)Stroke every sub-path, hard-edged 1px: closed ones (close() was called) via draw_polygon, open ones via draw_polyline.
Args:
- canvas (
Canvas): Canvas to stroke into. - path (
Path): Path to stroke. - color (
Color): Stroke color. - 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.