Bitmap/Bresenham's line algorithm: Difference between revisions
Content added Content deleted
m (Replaced "initImage" by "newImage" (change in "bitmap.nim" interface.) |
m (→{{header|Nim}}) |
||
Line 2,624: | Line 2,624: | ||
<lang nim>import bitmap |
<lang nim>import bitmap |
||
proc drawLine*(img: |
proc drawLine*(img: Image; p, q: Point; color: Color) = |
||
let |
let |
||
dx = abs(q.x - p.x) |
dx = abs(q.x - p.x) |