System::Drawing::Rectangle::Inflate 方法

Rectangle::Inflate(const Size&) method

在保持矩形几何中心位置不变的情况下,增加当前对象所表示的矩形的宽度和高度。宽度和高度分别按指定尺寸对象的宽度和高度值对应的量增加。

void System::Drawing::Rectangle::Inflate(const Size &size)
参数类型描述
sizeconst Size&指定用于增加矩形宽度和高度的量的 Size 对象

另见

Rectangle::Inflate(int, int) method

在保持矩形几何中心位置不变的情况下,增加当前对象所表示的矩形的宽度和高度。宽度和高度在两个方向上均按指定的量增加。

void System::Drawing::Rectangle::Inflate(int width, int height)
参数类型描述
widthint矩形宽度在两个方向上要增加的量
heightint矩形高度在两个方向上要增加的量

另见

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

在保持矩形几何中心位置不变的情况下,增加指定对象所表示的矩形的宽度和高度。宽度和高度在两个方向上均按指定的量增加。

static Rectangle System::Drawing::Rectangle::Inflate(const Rectangle &rect, int x, int y)
参数类型描述
rectconst Rectangle&要膨胀的矩形
xint矩形宽度在两个方向上要增加的量
yint矩形高度在两个方向上要增加的量

ReturnValue

表示放大后矩形的 Rectangle 对象

另见