Std.Ui.Draw.line
1 declaration
fn
line: &Std.Ui.Canvas.Canvas -> Std.Ui.Canvas.Point -> Std.Ui.Canvas.Point -> Int -> Std.Ui.Canvas.Color -> Result[Std.Ui.Canvas.Canvas, Std.Ui.Draw.DrawError]The canvas with a straight stroke from from to to, width pixels across, with round ends.
A pixel is painted when its centre lies within half the width of the segment, measured exactly in integers, so a stroke's pixels do not depend on floating-point rounding. Each covered row becomes one fill.
