line rasterization with 8 direction version