Canvas line simplifier