Enumeration

CGPathElementType

The type of element found in a path.

Declaration

enum CGPathElementType : Int32

Overview

For more information about paths, see CGPath.

Topics

Constants

case moveToPoint

The path element that starts a new subpath. The element holds a single point for the destination. See the function moveTo(_:x:y:).

case addLineToPoint

The path element that adds a line from the current point to a new point. The element holds a single point for the destination. See the function addLineTo(_:x:y:).

case addQuadCurveToPoint

The path element that adds a quadratic curve from the current point to the specified point. The element holds a control point and a destination point. See the function addQuadCurve(_:cpx:cpy:endingAtX:y:).

case addCurveToPoint

The path element that adds a cubic curve from the current point to the specified point. The element holds two control points and a destination point. See the function addCurve(_:cp1x:cp1y:cp2x:cp2y:endingAtX:y:).

case closeSubpath

The path element that closes and completes a subpath. The element does not contain any points. See the function closeSubpath().

See Also

Applying a Function to the Elements of a Path

func apply(info: UnsafeMutableRawPointer?, function: CGPathApplierFunction)

For each element in a graphics path, calls a custom applier function.

typealias CGPathApplierFunction

Defines a callback function that can view an element in a graphics path.

struct CGPathElement

A data structure that provides information about a path element.

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