CGRect Constructors

Definition

Overloads

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)

Initializes a CGRect structure from native floating point values.

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)

Initializes a CGRect structure from native floating point values.

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

Parameters

x
nfloat

X component for the rectangle.

y
nfloat

Y component for the rectangle.

width
nfloat

Width component for the rectangle.

height
nfloat

Height component for the rectangle.

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