System::Drawing::Rectangle::Rectangle 构造函数

Rectangle::Rectangle() constructor

构造一个新的 Rectangle 对象实例,该对象表示一个矩形,其 X、Y 坐标以及宽度和高度值均设为 0。

System::Drawing::Rectangle::Rectangle()

另见

Rectangle::Rectangle(const Point&, const Size&) constructor

构造一个新的 Rectangle 对象,该对象表示一个矩形,其左上角坐标由 Point 类的实例指定,宽度和高度由 Size 类的实例指定。

System::Drawing::Rectangle::Rectangle(const Point &location, const Size &size)
ParameterType描述
locationconst Point&指定矩形左上角的位置
sizeconst Size&指定矩形的宽度和高度

另见

Rectangle::Rectangle(const System::Windows::Forms::Screen::Rectangle_&) constructor

构造一个新的 Rectangle 对象,该对象表示与指定矩形等价的矩形。

System::Drawing::Rectangle::Rectangle(const System::Windows::Forms::Screen::Rectangle_ &rect)
ParameterType描述
rectconst System::Windows::Forms::Screen::Rectangle_&一个 System::Windows::Forms::Screen::Rectangle_ 类的实例,用于指定即将构造的对象所表示矩形的位置和大小。

另见

Rectangle::Rectangle(int, int, int, int) constructor

构造一个新的 Rectangle 对象,该对象表示一个矩形,其左上角坐标以及宽度和高度已指定。

System::Drawing::Rectangle::Rectangle(int x, int y, int width, int height)
ParameterType描述
xint矩形左上角的 X 坐标值
yint矩形左上角的 Y 坐标值
widthint矩形的宽度
heightint矩形的高度

另见