Bresenham line drawing algorithm so line() function supports diagonal lines.