Implemented the new line drawing algorithm