Std.Ui.Draw.polygon
1 declaration
fn
polygon: &Std.Ui.Canvas.Canvas -> &Array[Std.Ui.Canvas.Point] -> Std.Ui.Canvas.Color -> Result[Std.Ui.Canvas.Canvas, Std.Ui.Draw.DrawError]The canvas with the polygon through points filled by the even-odd rule: a pixel is painted when a ray from its centre crosses the outline an odd number of times. Crossings are rounded up on doubled coordinates, which decides an odd pixel centre against them exactly; one fill per span.
