line-drawing-0.1.0.0: raster line drawing

Copyright(C) 2019 Francesco Ariis
LicenseBSD3 (see LICENSE file)
MaintainerFrancesco Ariis <fa-ml@ariis.it>
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Line.Draw

Description

Rasterisation of line segments on discrete graphical media (line drawing algorithm).

Example:

λ> bresenham (0, 0) (4, 2)
[(0,0), (1,0), (2,1), (3,1), (4,2)]
Synopsis

Documentation

type Coords = (Int, Int) Source #

bresenham :: Coords -> Coords -> [Coords] Source #

Rasterising a line using Bresenham's algorithm.