Version

GetInflated Method

Expands or shrinks the current rectangle by using the specified width and height amounts, in all directions. The size and position of the current rectangle are not changed.
Syntax
'Declaration
 
Public Shared Function GetInflated( _
   ByVal rect As Rect, _
   ByVal width As Double, _
   ByVal height As Double _
) As Rect
public static Rect GetInflated( 
   Rect rect,
   double width,
   double height
)

Parameters

rect
The source rectangle.
width
The amount by which to expand or shrink the left and right sides of the rectangle.
height
The amount by which to expand or shrink the top and bottom sides of the rectangle.

Return Value

Inflated rectangle.
Remarks
The Width of the resulting rectangle is increased or decreased by twice the specified width offset, because it is applied to both the left and right sides of the rectangle. Likewise, the Height of the resulting rectangle is increased or decreased by twice the specified height.

If the specified width or height shrink the rectangle by more than its current Width or Height—giving the rectangle a negative area—the rectangle becomes the Empty rectangle.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also