Function curveToBezier