CGRect.Inflate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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(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(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