line: fix cython exception when calculating ellipse/circle if segments % 2 == 1. closes #1115