Share via


SKShapeNode.FromRect Method

Definition

Overloads

Name Description
FromRect(CGRect)
FromRect(CGSize)
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)

[Foundation.Export("shapeNodeWithRect:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static SpriteKit.SKShapeNode FromRect(CoreGraphics.CGRect rect);
[<Foundation.Export("shapeNodeWithRect:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member FromRect : CoreGraphics.CGRect -> SpriteKit.SKShapeNode

Parameters

rect
CGRect

Returns

Attributes

Applies to

FromRect(CGSize)

[Foundation.Export("shapeNodeWithRectOfSize:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static SpriteKit.SKShapeNode FromRect(CoreGraphics.CGSize size);
[<Foundation.Export("shapeNodeWithRectOfSize:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
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.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static SpriteKit.SKShapeNode FromRect(CoreGraphics.CGRect rect, System.Runtime.InteropServices.NFloat cornerRadius);
[<Foundation.Export("shapeNodeWithRect:cornerRadius:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member FromRect : CoreGraphics.CGRect * System.Runtime.InteropServices.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.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static SpriteKit.SKShapeNode FromRect(CoreGraphics.CGSize size, System.Runtime.InteropServices.NFloat cornerRadius);
[<Foundation.Export("shapeNodeWithRectOfSize:cornerRadius:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member FromRect : CoreGraphics.CGSize * System.Runtime.InteropServices.NFloat -> SpriteKit.SKShapeNode

Parameters

size
CGSize
cornerRadius
NFloat

Returns

Attributes

Applies to