Corrected the line algo, and tried wu's algo for antiailasing line, but still not working.