Rectangle.Inflate

Inflate(Rectangle, int, int)

Creates and returns an inflated copy of the specified Rectangle structure. The copy is inflated by the specified amount. The original Rectangle structure remains unmodified.

public static Rectangle Inflate(Rectangle rect, int x, int y)
ParameterTypeDescription
rectRectangleThe Rectangle with which to start. This rectangle is not modified.
xInt32The amount to inflate this Rectangle horizontally.
yInt32The amount to inflate this Rectangle vertically.

Return Value

The inflated Rectangle.

See Also


Inflate(int, int)

Inflates this Rectangle by the specified amount.

public void Inflate(int width, int height)
ParameterTypeDescription
widthInt32The amount to inflate this Rectangle horizontally.
heightInt32The amount to inflate this Rectangle vertically.

See Also


Inflate(Size)

Inflates this Rectangle by the specified amount.

public void Inflate(Size size)
ParameterTypeDescription
sizeSizeThe amount to inflate this rectangle.

See Also