Instance Method

addLineToPoint:

Appends a straight line to the receiver’s path.

Declaration

- (void)addLineToPoint:(CGPoint)point;

Parameters

point

The destination point of the line segment, specified in the current coordinate system.

Discussion

This method creates a straight line segment starting at the current point and ending at the point specified by the point parameter. After adding the line segment, this method updates the current point to the value in point.

You must set the path’s current point (using the moveToPoint: method or through the previous creation of a line or curve segment) before you call this method. If the path is empty, this method does nothing.

See Also

Constructing a Path

moveToPoint:

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

addArcWithCenter:radius:startAngle:endAngle:clockwise:

Appends an arc to the receiver’s path.

addCurveToPoint:controlPoint1:controlPoint2:

Appends a cubic Bézier curve to the receiver’s path.

addQuadCurveToPoint:controlPoint:

Appends a quadratic Bézier curve to the receiver’s path.

closePath

Closes the most recently added subpath.

removeAllPoints

Removes all points from the receiver, effectively deleting all subpaths.

appendPath:

Appends the contents of the specified path object to the receiver’s path.

CGPath

The Core Graphics representation of the path.

CGPath

The Core Graphics representation of the path.

currentPoint

The current point in the graphics path.