Type Method

shapeNodeWithPath:centered:

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

Declaration

+ (instancetype)shapeNodeWithPath:(CGPathRef)path centered:(BOOL)centered;

Parameters

path

The Core Graphics path to use.

centered

If YES, 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

+ shapeNodeWithPath:

Creates a shape node from a Core Graphics path.

path

The path that defines the shape.