Instance Method

move(to:)

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

Declaration

func move(to point: NSPoint)

Parameters

aPoint

A point in the current coordinate system.

Discussion

This method implicitly closes the current subpath (if any) and sets the current point to the value in aPoint. When closing the previous subpath, this method does not cause a line to be created from the first and last points in the subpath.

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

See Also

Constructing Paths

func line(to: NSPoint)

Appends a straight line to the receiver’s path

func curve(to: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint)

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

func close()

Closes the most recently added subpath.

func relativeMove(to: NSPoint)

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

func relativeLine(to: NSPoint)

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.

func relativeCurve(to: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint)

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.