Contents

init(path:centered:)

Creates a shape node from a Core Graphics path, centered around its position.

Declaration

convenience init(path: CGPath, centered: Bool)

Parameters

  • path:

    The Core Graphics path to use.

  • centered:

    If True, the path is translated so that the center of the path’s bounding box is at the node’s origin; otherwise the path is relative to the node’s origin.

Return Value

A new shape node.

See Also

Creating a Shape from a Path