Anonymous user
Bitmap/Bresenham's line algorithm: Difference between revisions
Changed "pixel" to "color" and "Pixel" to "Color" to match "bitmap.nim" interface.
m (Added export mark fro "drawLine".) |
(Changed "pixel" to "color" and "Pixel" to "Color" to match "bitmap.nim" interface.) |
||
Line 2,624:
<lang nim>import bitmap
proc drawLine*(img: var Image; p, q: Point;
let
dx = abs(q.x - p.x)
Line 2,638:
while true:
img[p.x, p.y] =
if p == q:
break
|