Instance Method

mutableCopy()

Creates a mutable copy of an existing graphics path.

Declaration

func mutableCopy() -> CGMutablePath?

Parameters

path

The path to copy.

Return Value

A new, mutable, copy of the specified path. You are responsible for releasing this object.

Discussion

You can modify a mutable graphics path by calling the various path geometry functions, such as addArc(_:x:y:radius:startAngle:endAngle:clockwise:), addLineTo(_:x:y:), and moveTo(_:x:y:).

See Also

Copying a Graphics Path

func copy() -> CGPath?

Creates an immutable copy of a graphics path.

func copy(using: UnsafePointer<CGAffineTransform>?) -> CGPath?

Creates an immutable copy of a graphics path transformed by a transformation matrix.

func copy(dashingWithPhase: CGFloat, lengths: [CGFloat], transform: CGAffineTransform) -> CGPath

Returns a new path equivalent to the results of drawing the path with a dashed stroke.

func mutableCopy(using: UnsafePointer<CGAffineTransform>?) -> CGMutablePath?

Creates a mutable copy of a graphics path transformed by a transformation matrix.

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