Initializer

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

init(path: CGPath)

Creates a shape node from a Core Graphics path.

var path: CGPath?

The path that defines the shape.