Bresenham's Algorithm not drawing horizontal lines
e = (float)(delta_x / delta_y) - 1.0;

e += (float)delta_x / delta_y;


Either of these lines will cause a divide-by-zero error when delta_y is zero, which is when the line is horizontal (or zero-length). You need to check for this condition and have some special-case code.

As an aside, I don't know why people still teach Bresenham's algorithm to new CG students. It's a good example of an algorithm but it's not very useful knowledge in itself: you're unlikely to need to know it unless it's for a job interview.