Type Method

shapeNodeWithRectOfSize:

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

Declaration

+ (instancetype)shapeNodeWithRectOfSize:(CGSize)size;

Parameters

size

The size of the rectangle.

Return Value

A new shape node.

See Also

Creating a Shape from a Rectangle

+ shapeNodeWithRect:

Creates a shape node with a rectangular path.

+ 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.