fixed tearing artifacts in line/arc draw code.