Instance Property

CGPath

The Core Graphics representation of the path.

Declaration

@property(nonatomic) CGPathRef CGPath;

Discussion

This property contains a snapshot of the path at any given point in time. Getting this property returns an immutable path object that you can pass to Core Graphics functions. The path object itself is owned by the UIBezierPath object and is valid only until you make further modifications to the path.

You can set the value of this property to a path you built using the functions of the Core Graphics framework. When setting a new path, this method makes a copy of the path you provide.

See Also

Constructing a Path

- moveToPoint:

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

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

currentPoint

The current point in the graphics path.