Instance Method

moveToPoint:

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

Declaration

- (void)moveToPoint:(CGPoint)point;

Parameters

point

A point in the current coordinate system.

Discussion

This method implicitly ends the current subpath (if any) and sets the current point to the value in the point parameter. When ending the previous subpath, this method does not actually close the subpath. Therefore, the first and last points of the previous subpath are not connected to each other.

For many path operations, you must call this method before issuing any commands that cause a line or curve segment to be drawn.

See Also

Constructing a Path

- addLineToPoint:

Appends a straight line to the receiver’s path.

- 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.