Instance Property


Returns the smallest rectangle that contains the current path.


var boundingBoxOfPath: CGRect { get }



The graphics context, containing a path, to examine.

Return Value

The dimensions and location, in user space, of the bounding box of the path. If there is no path, the function returns null.


The bounding box is the smallest rectangle completely enclosing all points in a path, including control points for Bézier cubic and quadratic curves.

See Also

Examining the Current Graphics Path

var currentPointOfPath: CGPoint

Returns the current point in a non-empty path.

var isPathEmpty: Bool

Indicates whether the current path contains any subpaths.

func pathContains(CGPoint, mode: CGPathDrawingMode) -> Bool

Checks to see whether the specified point is contained in the current path.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software