Share via


CGRect.Inflate Method

Definition

Overloads

Name Description
Inflate(Single, Single)
Inflate(CGSize)

Enlarges this CGRect by the specified amount.

Inflate(Double, Double)

Increases the size of the rectangle by adding the specified amounts along both directions of each axis.

Inflate(NFloat, NFloat)
Inflate(CGRect, NFloat, NFloat)

Inflate(Single, Single)

public void Inflate(float x, float y);
member this.Inflate : single * single -> unit

Parameters

x
Single
y
Single

Applies to

Inflate(CGSize)

Enlarges this CGRect by the specified amount.

public void Inflate(CoreGraphics.CGSize size);
member this.Inflate : CoreGraphics.CGSize -> unit

Parameters

size
CGSize

<attribution license="cc4" from="Microsoft" modified="false"></attribution>The amount to inflate this rectangle.

Remarks

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

This method enlarges this rectangle, not a copy of it. The rectangle is enlarged in both directions along an axis. For example, if a 50 by 50 rectangle is enlarged by 50 in the x-axis, the resultant rectangle will be 150 units long (the original 50, the 50 in the minus direction, and the 50 in the plus direction) maintaining the rectangle's geometric center.

If either element of the size parameter is negative, the CGRect structure is deflated in the corresponding direction.

Applies to

Inflate(Double, Double)

Increases the size of the rectangle by adding the specified amounts along both directions of each axis.

public void Inflate(double x, double y);
member this.Inflate : double * double -> unit

Parameters

x
Double

The amount to add to both horizontal sides.

y
Double

The amount to add to both vertical sides.

Remarks

Inflating a rectangle that is of size [1,1] and centered on [1,1] results in a rectangle of size [,3,3] centered on the same spot, since the x and y inflations are applied to all sides.

Applies to

Inflate(NFloat, NFloat)

public void Inflate(System.Runtime.InteropServices.NFloat x, System.Runtime.InteropServices.NFloat y);
member this.Inflate : System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> unit

Parameters

x
NFloat
y
NFloat

Applies to

Inflate(CGRect, NFloat, NFloat)

public static CoreGraphics.CGRect Inflate(CoreGraphics.CGRect rect, System.Runtime.InteropServices.NFloat x, System.Runtime.InteropServices.NFloat y);
static member Inflate : CoreGraphics.CGRect * System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> CoreGraphics.CGRect

Parameters

rect
CGRect
x
NFloat
y
NFloat

Returns

Applies to