Jump to content

Bitmap/Bresenham's line algorithm: Difference between revisions

m
Added export mark fro "drawLine".
(Added "import bitmap", adding pixel parameter (color), adding example and output.)
m (Added export mark fro "drawLine".)
Line 2,624:
<lang nim>import bitmap
 
proc drawLine*(img: var Image; p, q: Point; pixel: Pixel) =
let
dx = abs(q.x - p.x)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.