Rectangle()

Rectangle::Rectangle() constructor

Constructs a new instance of Rectangle object that represents a rectangle with X and Y coordinates and width and hegiht values set to 0.

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

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

Constructs a new instance of Rectangle object that represents a rectangle with the specified coordinates of its upper left corner and width and height.

System::Drawing::Rectangle::Rectangle(int x, int y, int width, int height)

Arguments

ParameterTypeDescription
xintA value of the X coordinate of the upper left corner of the rectangle
yintA value of the Y coordinate of the upper left corner of the rectangle
widthintThe width of the rectangle
heightintThe height of the rectangle

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

Constructs a new instance of Rectangle object that represents a rectangle with the coordinates of its upper left corner specified as an instance of Point class and its width and height as an instance of Size class.

System::Drawing::Rectangle::Rectangle(const Point &location, const Size &size)

Arguments

ParameterTypeDescription
locationconst Point&Specifies the location of the upper left corner of the rectangle
sizeconst Size&Specifies the width and hegiht of the rectangle

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

Constructs a new instance of Rectangle object that represents the rectangle equivalent to the specified one.

System::Drawing::Rectangle::Rectangle(const System::Windows::Forms::Screen::Rectangle_ &rect)

Arguments

ParameterTypeDescription
rectconst System::Windows::Forms::Screen::Rectangle_&An instance of System::Windows::Forms::Screen::Rectangle_ class that specifies the position and size of the rectangle to be represented by the object being constructed

See Also