Share via


CGRect Constructors

Definition

Overloads

Name Description
CGRect(CGPoint, CGSize)

Initializes a CGRect structure from a rectangle and a size parameters.

CGRect(Double, Double, Double, Double)

Initializes a CGRect structure from a double precision floating point values, with potential truncation on 32 bit systems.

CGRect(NFloat, NFloat, NFloat, NFloat)
CGRect(Single, Single, Single, Single)

Constructs a rectangle with the specified dimensions.

CGRect(CGPoint, CGSize)

Initializes a CGRect structure from a rectangle and a size parameters.

public CGRect(CoreGraphics.CGPoint location, CoreGraphics.CGSize size);
new CoreGraphics.CGRect : CoreGraphics.CGPoint * CoreGraphics.CGSize -> CoreGraphics.CGRect

Parameters

location
CGPoint

Rectangle location.

size
CGSize

Dimensions for the rectangle.

Applies to

CGRect(Double, Double, Double, Double)

Initializes a CGRect structure from a double precision floating point values, with potential truncation on 32 bit systems.

public CGRect(double x, double y, double width, double height);
new CoreGraphics.CGRect : double * double * double * double -> CoreGraphics.CGRect

Parameters

x
Double

X component for the rectangle.

y
Double

Y component for the rectangle.

width
Double

Width component for the rectangle.

height
Double

Height component for the rectangle.

Remarks

This initializes the structure with the given parameters. On 32-bit systems, the values will be explicitly cast to single precision floating point values.

Applies to

CGRect(NFloat, NFloat, NFloat, NFloat)

public CGRect(System.Runtime.InteropServices.NFloat x, System.Runtime.InteropServices.NFloat y, System.Runtime.InteropServices.NFloat width, System.Runtime.InteropServices.NFloat height);
new CoreGraphics.CGRect : System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> CoreGraphics.CGRect

Parameters

x
NFloat
y
NFloat
width
NFloat
height
NFloat

Applies to

CGRect(Single, Single, Single, Single)

Constructs a rectangle with the specified dimensions.

public CGRect(float x, float y, float width, float height);
new CoreGraphics.CGRect : single * single * single * single -> CoreGraphics.CGRect

Parameters

x
Single
y
Single
width
Single
height
Single

Applies to