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)


public void Inflate (
         int horizontalAmount,
         int verticalAmount


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


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


Rectangle Structure
Rectangle Members
Microsoft.Xna.Framework Namespace


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