Rectangle.Inflate Method

Pushes the edges of the Rectangle out by the horizontal and vertical values specified.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public void Inflate (
         int horizontalAmount,
         int verticalAmount
)

Parameters

  • horizontalAmount
    Type: Int32
    Value to push the sides out by.
  • verticalAmount
    Type: Int32
    Value to push the top and bottom out by.

Remarks

Each corner of the Rectangle is pushed away from the center of the rectangle by the specified amounts. This results in the width and height of the Rectangle increasing by twice the values provided.

See Also

Reference

Rectangle Structure
Rectangle Members
Microsoft.Xna.Framework Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone