DDA
Assume that the slope is between 0 and 1
Simplest algorithm (pompously called differential digital analyzer):
Step along x, increment y by slope at each step.
Round y to nearest pixel.
float slope = (y2-y1)/(float)(x2-x1);
for(x = x1; x <= x2; x++) {