Type Method

shapeNodeWithRect:

Creates a shape node with a rectangular path.

Declaration

+ (instancetype)shapeNodeWithRect:(CGRect)rect;

Parameters

rect

A rectangle, relative to the node’s origin.

Return Value

A new shape node.

See Also

Creating a Shape from a Rectangle

+ shapeNodeWithRectOfSize:

Creates a shape node with a rectangular path centered on the node’s origin.

+ shapeNodeWithRect:cornerRadius:

Creates a shape with a rectangular path that has rounded corners.

+ shapeNodeWithRectOfSize:cornerRadius:

Creates a shape with a rectangular path that has rounded corners centered on the node’s position.