draw line using slope algorithm
optimizate drawing line