curve(to:controlPoint1:controlPoint2:)
Adds a Bezier cubic curve to the path.
Declaration
func curve(to endPoint: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint)Parameters
- endPoint:
The destination point of the curve segment, specified in the current coordinate system
- controlPoint1:
The point that determines the shape of the curve near the current point.
- controlPoint2:
The point that determines the shape of the curve near the destination point.
Discussion
You must set the path’s current point (using the move(to:) method or through the creation of a preceding line or curve segment) before you invoke this method. If the path is empty, this method raises an genericException exception.