Data source: http://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm