drawing using bresenham algorithm