optimized arc functions by using spanAngle instead of endAngle