This documentation is archived and is not being maintained.

RectangleF.Inflate Method (Single, Single)

.NET Framework 1.1

Inflates this RectangleF structure by the specified amount.

[Visual Basic]
Overloads Public Sub Inflate( _
   ByVal x As Single, _
   ByVal y As Single _
public void Inflate(
 float x,
 float y
public: void Inflate(
 float x,
 float y
public function Inflate(
   x : float,
 y : float


The amount to inflate this RectangleF structure horizontally.
The amount to inflate this RectangleF structure vertically.

Return Value

This method does not return a value.


This method inflates this rectangle, not a copy of it. The inflation along an axis is in two directions (minus direction and plus direction). For example, if a 50 by 50 rectangle is inflated 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 x or y is negative, the RectangleF is deflated in the corresponding direction.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RectangleF Structure | RectangleF Members | System.Drawing Namespace | RectangleF.Inflate Overload List