Inflate()

Rectangle::Inflate(int, int) method

Increases the width and height of the rectangle represented by the current object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the specified amounts.

void System::Drawing::Rectangle::Inflate(int width, int height)

Arguments

ParameterTypeDescription
widthintThe amount by which the width of the rectangle is to be increased in both directions
heightintThe amount by which the height of the rectangle is to be increased in both directions

Rectangle::Inflate(const Size&) method

Increases the width and height of the rectangle represented by the current object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the amounts specified by width and height values of the specified size object correspondingly.

void System::Drawing::Rectangle::Inflate(const Size &size)

Arguments

ParameterTypeDescription
sizeconst Size&The Size object specifying the amounts to increase the width and height of the rectangle by

Rectangle::Inflate(const Rectangle&, int, int) method

Increases the width and height of the rectangle represented by the specified object, maintaining the location of the geometrical center of the rectangle. The width and height are increased in both directions by the specified amounts.

static Rectangle System::Drawing::Rectangle::Inflate(const Rectangle &rect, int x, int y)

Arguments

ParameterTypeDescription
rectconst Rectangle&A rectangle to inflate
xintThe amount by which the width of the rectangle is to be increased in both directions
yintThe amount by which the height of the rectangle is to be increased in both directions

Return Value

The Rectangle object representing the enlarged rectangle

See Also