PathElementType

public enum PathElementType

An enum representing types of path elements, used in defining animation along the path.

  • The path element that starts a new subpath. The element holds a single point for the destination.

    Declaration

    Swift

    case move(to: CGPoint)
  • The path element that adds a line from the current point to a new point. The element holds a single point for the destination.

    Declaration

    Swift

    case addLine(to: CGPoint)
  • 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.

    Declaration

    Swift

    case addQuadCurve(CGPoint, to: CGPoint)
  • 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.

    Declaration

    Swift

    case addCurve(CGPoint, CGPoint, to: CGPoint)
  • The path element that closes and completes a subpath. The element does not contain any points.

    Declaration

    Swift

    case closeSubpath
  • An unknown type (should only happen if Apple adds a new element type some day).

    Declaration

    Swift

    case unknown
  • Initializer.

    Declaration

    Swift

    public init(element: CGPathElement)

    Parameters

    element

    The path element to represent.