draw pixel

x: y:

width:100 height:100

draw line

x1: y1:
x2: y2:

width:100 height:100

Reference: Bresenham's Algorithm for drawing line