Edit

Share via


SKShapeNode.FromRect Method

Definition

Overloads

FromRect(CGRect)

Creates a shape node from the specified rectangle.

FromRect(CGSize)

Creates a shape node by treating the specified size as a rectangle.

FromRect(CGRect, nfloat)

Creates a shape node from the specified rectangle and the specified corner radius.

FromRect(CGSize, nfloat)

Creates a shape node with the specified corner radius by treating the specified size as a rectangle.

FromRect(CGRect)

Creates a shape node from the specified rectangle.

[Foundation.Export("shapeNodeWithRect:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public static SpriteKit.SKShapeNode FromRect (CoreGraphics.CGRect rect);
static member FromRect : CoreGraphics.CGRect -> SpriteKit.SKShapeNode

Parameters

rect
CGRect

Returns

Attributes

Applies to

FromRect(CGSize)

Creates a shape node by treating the specified size as a rectangle.

[Foundation.Export("shapeNodeWithRectOfSize:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public static SpriteKit.SKShapeNode FromRect (CoreGraphics.CGSize size);
static member FromRect : CoreGraphics.CGSize -> SpriteKit.SKShapeNode

Parameters

size
CGSize

Returns

Attributes

Applies to

FromRect(CGRect, nfloat)

Creates a shape node from the specified rectangle and the specified corner radius.

[Foundation.Export("shapeNodeWithRect:cornerRadius:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public static SpriteKit.SKShapeNode FromRect (CoreGraphics.CGRect rect, nfloat cornerRadius);
static member FromRect : CoreGraphics.CGRect * nfloat -> SpriteKit.SKShapeNode

Parameters

rect
CGRect
cornerRadius
nfloat

Returns

Attributes

Applies to

FromRect(CGSize, nfloat)

Creates a shape node with the specified corner radius by treating the specified size as a rectangle.

[Foundation.Export("shapeNodeWithRectOfSize:cornerRadius:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.All, null)]
public static SpriteKit.SKShapeNode FromRect (CoreGraphics.CGSize size, nfloat cornerRadius);
static member FromRect : CoreGraphics.CGSize * nfloat -> SpriteKit.SKShapeNode

Parameters

size
CGSize
cornerRadius
nfloat

Returns

Attributes

Applies to