Bitmap/Bresenham's line algorithm: Difference between revisions

Content added Content deleted
(Changed "pixel" to "color" and "Pixel" to "Color" to match "bitmap.nim" interface.)
m (Replaced "initImage" by "newImage" (change in "bitmap.nim" interface.)
Line 2,650: Line 2,650:


when isMainModule:
when isMainModule:
var img = initImage(16, 16)
var img = newImage(16, 16)
img.fill(White)
img.fill(White)
img.drawLine((0, 7), (7, 15), Black)
img.drawLine((0, 7), (7, 15), Black)