Instance Method

curveToPoint:controlPoint1:controlPoint2:

Adds a Bezier cubic curve to the receiver’s path.

Declaration

- (void)curveToPoint:(NSPoint)endPoint controlPoint1:(NSPoint)controlPoint1 controlPoint2:(NSPoint)controlPoint2;

Parameters

aPoint

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 moveToPoint: 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 NSGenericException exception.

See Also

Constructing Paths

- moveToPoint:

Moves the receiver’s current point to the specified location.

- lineToPoint:

Appends a straight line to the receiver’s path

- closePath

Closes the most recently added subpath.

- relativeMoveToPoint:

Moves the receiver’s current point to a new point whose location is the specified distance from the current point.

- relativeLineToPoint:

Appends a straight line segment to the receiver’s path starting at the current point and moving towards the specified point, relative to the current location.

- relativeCurveToPoint:controlPoint1:controlPoint2:

Adds a Bezier cubic curve to the receiver’s path from the current point to a new location, which is specified as a relative distance from the current point.