Stores a set of four integers that represent the location and size of a rectangle.
Fields  
static const rectangle  empty 
Represents a xtd::drawing::rectangle that has xtd::drawing::rectagle::x, xtd::drawing::rectangle::y, xtd::drawing::rectangle::width and xtd::drawing::rectangle::height values set to zero. More...  
Constructors  
rectangle () noexcept=default  
Initializes a new instance of the xtd::drawing::rectangle class. More...  
rectangle (int32 x, int32 y, int32 width, int32 height) noexcept  
Initializes a new instance of the xtd::drawing::rectangle class with the specified location and size. More...  
rectangle (const xtd::drawing::point &location, const xtd::drawing::size &size) noexcept  
Initializes a new instance of the xtd::drawing::rectangle class with the specified location and size. More...  
Properties  
int32  bottom () const noexcept 
Gets the ycoordinate that is the sum of the xtd::drawing::rectangle::y and xtd::drawing::rectangle::height property values of this xtd::drawing::rectangle structure. More...  
int32  height () const noexcept 
Gets the height of this xtd::drawing::rectangle structure. More...  
void  height (int32 value) noexcept 
Sets the height of this xtd::drawing::rectangle structure. More...  
bool  is_empty () const noexcept 
Tests whether all numeric properties of this xtd::drawing::rectangle have values of zero. More...  
int32  left () const noexcept 
Gets the xcoordinate of the left edge of this xtd::drawing::rectangle structure. More...  
xtd::drawing::point  location () const noexcept 
Gets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure. More...  
void  location (const xtd::drawing::point &value) noexcept 
Sets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure. More...  
int32  right () const noexcept 
Gets the xcoordinate that is the sum of xtd::drawing::rectangle::x and xtd::drawing::rectangle::width property values of this xtd::drawing::rectangle structure. More...  
xtd::drawing::size  size () const noexcept 
Gets the size of this xtd::drawing::rectangle. More...  
void  size (const xtd::drawing::size &value) noexcept 
Sets the size of this xtd::drawing::rectangle. More...  
int32  top () const noexcept 
Gets the ycoordinate of the top edge of this xtd::drawing::rectangle structure. More...  
int32  width () const noexcept 
Gets the width of this xtd::drawing::rectangle structure. More...  
void  width (int32 value) noexcept 
Sets the width of this xtd::drawing::rectangle structure. More...  
int32  x () const noexcept 
Gets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure. More...  
void  x (int32 value) noexcept 
Sets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure. More...  
int32  y () const noexcept 
Gets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure. More...  
void  y (int32 value) noexcept 
Sets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure. More...  
Methods  
void  add (const drawing::size &sz) noexcept 
Adds this xtd::drawing::rectangle by the specified amount. More...  
void  add (int32 width, int32 height) noexcept 
Adds this xtd::drawing::rectangle by the specified amount. More...  
bool  contains (const xtd::drawing::point &pt) const noexcept 
Determines if the specified point is contained within this xtd::drawing::rectangle structure. More...  
bool  contains (const xtd::drawing::rectangle &rect) const noexcept 
Determines if the rectangular region represented by rect is entirely contained within this xtd::drawing::rectangle structure. More...  
bool  contains (int32 x, int32 y) const noexcept 
Determines if the specified point is contained within this xtd::drawing::rectangle structure. More...  
bool  equals (const rectangle &value) const noexcept override 
void  inflate (const drawing::size &sz) noexcept 
Enlarges this xtd::drawing::rectangle by the specified amount. More...  
void  inflate (int32 width, int32 height) noexcept 
Enlarges this xtd::drawing::rectangle by the specified amount. More...  
bool  intersects_with (const rectangle &rect) const noexcept 
Determines if this rectangle intersects with rect. More...  
void  make_intersect (const rectangle &rect) noexcept 
Replaces this xtd::drawing::rectangle with the intersection of itself and the specified xtd::drawing::rectangle. More...  
void  make_union (const rectangle &rect) noexcept 
Replaces this xtd::drawing::rectangle with the union of itself and the specified xtd::drawing::rectangle. More...  
void  offset (const point &pos) noexcept 
Adjusts the location of this rectangle by the specified amount. More...  
void  offset (int32 x, int32 y) noexcept 
Adjusts the location of this rectangle by the specified amount. More...  
xtd::ustring  to_string () const noexcept override 
Converts the attributes of this xtd::drawing::rectangle to a humanreadable string. More...  
static rectangle  add (const rectangle &rect, int32 x, int32 y) noexcept 
Creates and returns an added copy of the specified xtd::drawing::rectangle structure. The copy is added by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  add (const rectangle &rect, const drawing::size &sz) noexcept 
Creates and returns an added copy of the specified xtd::drawing::rectangle structure. The copy is added by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  ceiling (const xtd::drawing::rectangle_f &rect) noexcept 
Converts the specified xtd::drawing::rectangle_f structure to a xtd::drawing::rectangle structure by rounding the xtd::drawing::rectangle_f values to the next higher integer values. More...  
static rectangle  from_ltrb (int32 left, int32 top, int32 right, int32 bottom) noexcept 
Creates a xtd::drawing::rectangle structure with the specified edge locations. More...  
static rectangle  inflate (const rectangle &rect, int32 x, int32 y) noexcept 
Creates and returns an enlarged copy of the specified xtd::drawing::rectangle structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  inflate (const rectangle &rect, const drawing::size &sz) noexcept 
Creates and returns an enlarged copy of the specified xtd::drawing::rectangle structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  make_intersect (const rectangle &a, const rectangle &b) noexcept 
Returns a third xtd::drawing::rectangle structure that represents the intersection of two other xtd::drawing::rectangle structures. If there is no intersection, an empty xtd::drawing::rectangle is returned. More...  
static rectangle  make_union (const rectangle &a, const rectangle &b) noexcept 
Gets a xtd::drawing::rectangle structure that contains the union of two xtd::drawing::rectangle structures. More...  
static rectangle  offset (const rectangle &rect, const point &pos) noexcept 
Creates and returns an offsetted copy of the specified xtd::drawing::rectangle structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  offset (const rectangle &rect, int32 x, int32 y) noexcept 
Creates and returns an offsetted copy of the specified xtd::drawing::rectangle structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle structure remains unmodified. More...  
static rectangle  round (const rectangle_f &rect) noexcept 
Converts the specified xtd::drawing::rectangle_f to a xtd::drawing::rectangle by rounding the xtd::drawing::rectangle_f values to the nearest integer values. More...  
static rectangle  truncate (const rectangle_f &rect) noexcept 
Converts the specified xtd::drawing::rectangle_f to a xtd::drawing::rectangle by truncating the xtd::drawing::rectangle_f values. More...  
Additional Inherited Members  
Public Member Functions inherited from xtd::object  
object ()=default  
Create a new instance of the ultimate base class object. More...  
bool  equals (const object &obj) const noexcept 
Determines whether the specified object is equal to the current object. More...  
virtual size_t  get_hash_code () const noexcept 
Serves as a hash function for a particular type. More...  
virtual type_object  get_type () const noexcept 
Gets the type of the current instance. More...  
template<typename object_t >  
std::unique_ptr< object_t >  memberwise_clone () const noexcept 
Creates a shallow copy of the current object. More...  
Public Member Functions inherited from xtd::iequatable< rectangle >  
virtual bool  equals (const rectangle &) const noexcept=0 
Indicates whether the current object is equal to another object of the same type. More...  
Static Public Member Functions inherited from xtd::object  
static bool  equals (const object &object_a, const object &object_b) noexcept 
Determines whether the specified object instances are considered equal. More...  
static bool  reference_equals (const object &object_a, const object &object_b) noexcept 
Determines whether the specified object instances are the same instance. More...  

defaultnoexcept 
Initializes a new instance of the xtd::drawing::rectangle class.
Initializes a new instance of the xtd::drawing::rectangle class with the specified location and size.
x  The xcoordinate of the upperleft corner of the rectangle. 
y  The ycoordinate of the upperleft corner of the rectangle. 
width  The width of the rectangle. 
height  The height of the rectangle. 

noexcept 
Initializes a new instance of the xtd::drawing::rectangle class with the specified location and size.
location  A xtd::drawing::point that represents the upperleft corner of the rectangular region. 
size  A xtd::drawing::size that represents the width and height of the rectangular region. 

noexcept 
Adds this xtd::drawing::rectangle by the specified amount.
sz  The amount to add this rectangle. 
Adds this xtd::drawing::rectangle by the specified amount.
width  The amount to add this xtd::drawing::rectangle horizontally. 
height  The amount to add this xtd::drawing::rectangle verticaly. 

staticnoexcept 
Creates and returns an added copy of the specified xtd::drawing::rectangle structure. The copy is added by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
x  The amount to add the specified rectangle horizontally. 
y  The amount to add the specified rectangle vertically. 

staticnoexcept 
Creates and returns an added copy of the specified xtd::drawing::rectangle structure. The copy is added by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
sz  The amount to add the specified rectangle. 

noexcept 
Gets the ycoordinate that is the sum of the xtd::drawing::rectangle::y and xtd::drawing::rectangle::height property values of this xtd::drawing::rectangle structure.

staticnoexcept 
Converts the specified xtd::drawing::rectangle_f structure to a xtd::drawing::rectangle structure by rounding the xtd::drawing::rectangle_f values to the next higher integer values.
rect  The xtd::drawing::rectangle_f structure to be converted. 

noexcept 
Determines if the specified point is contained within this xtd::drawing::rectangle structure.
pt  The xtd::drawing::point to test. 

noexcept 
Determines if the rectangular region represented by rect is entirely contained within this xtd::drawing::rectangle structure.
rect  The xtd::drawing::rectangle to test. 
Determines if the specified point is contained within this xtd::drawing::rectangle structure.
x  The xcoordinate of the point to test. 
y  The ycoordinate of the point to test. 

staticnoexcept 
Creates a xtd::drawing::rectangle structure with the specified edge locations.
left  The xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure. 
top  The ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure. 
right  The xcoordinate of the lowerright corner of this xtd::drawing::rectangle structure. 
bottom  The ycoordinate of the lowerright corner of this xtd::drawing::rectangle structure. 

noexcept 
Gets the height of this xtd::drawing::rectangle structure.

noexcept 
Sets the height of this xtd::drawing::rectangle structure.
value  The height of this Rectangle structure. The default is 0. 

noexcept 
Enlarges this xtd::drawing::rectangle by the specified amount.
sz  The amount to inflate this rectangle. 
Enlarges this xtd::drawing::rectangle by the specified amount.
width  The amount to inflate this xtd::drawing::rectangle horizontally. 
height  The amount to inflate this xtd::drawing::rectangle verticaly. 

staticnoexcept 
Creates and returns an enlarged copy of the specified xtd::drawing::rectangle structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
x  The amount to inflate the specified rectangle horizontally. 
y  The amount to inflate the specified rectangle vertically. 

staticnoexcept 
Creates and returns an enlarged copy of the specified xtd::drawing::rectangle structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
sz  The amount to inflate the specified rectangle. 

noexcept 
Determines if this rectangle intersects with rect.
rect  The rectangle to test. 

noexcept 
Tests whether all numeric properties of this xtd::drawing::rectangle have values of zero.

noexcept 
Gets the xcoordinate of the left edge of this xtd::drawing::rectangle structure.

noexcept 
Gets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure.

noexcept 
Sets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure.
value  A xtd::drawing::point that represents the upperleft corner of this xtd::drawing::rectangle structure. 

staticnoexcept 
Returns a third xtd::drawing::rectangle structure that represents the intersection of two other xtd::drawing::rectangle structures. If there is no intersection, an empty xtd::drawing::rectangle is returned.
a  A rectangle to intersect. 
b  A rectangle to intersect. 

noexcept 
Replaces this xtd::drawing::rectangle with the intersection of itself and the specified xtd::drawing::rectangle.
rect  The xtd::drawing::rectangle with which to intersect. 

staticnoexcept 
Gets a xtd::drawing::rectangle structure that contains the union of two xtd::drawing::rectangle structures.
a  A rectangle to union. 
b  A rectangle to union. 

noexcept 
Replaces this xtd::drawing::rectangle with the union of itself and the specified xtd::drawing::rectangle.
rect  The xtd::drawing::rectangle with which to union. 

noexcept 
Adjusts the location of this rectangle by the specified amount.
pos  Amount to offset the location. 
Adjusts the location of this rectangle by the specified amount.
x  The horizontal offset. 
y  The vertical offset. 

staticnoexcept 
Creates and returns an offsetted copy of the specified xtd::drawing::rectangle structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
pos  The amount to offset the specified rectangle. 

staticnoexcept 
Creates and returns an offsetted copy of the specified xtd::drawing::rectangle structure. The copy is offsetted by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.
rect  The xtd::drawing::rectangle with which to start. This rectangle is not modified. 
x  The amount to offset the specified rectangle horizontally. 
y  The amount to offset the specified rectangle vertically. 

noexcept 
Gets the xcoordinate that is the sum of xtd::drawing::rectangle::x and xtd::drawing::rectangle::width property values of this xtd::drawing::rectangle structure.

staticnoexcept 
Converts the specified xtd::drawing::rectangle_f to a xtd::drawing::rectangle by rounding the xtd::drawing::rectangle_f values to the nearest integer values.
rect  The xtd::drawing::rectangle_f to be converted. 

noexcept 
Gets the size of this xtd::drawing::rectangle.

noexcept 
Sets the size of this xtd::drawing::rectangle.
value  A xtd::drawing::size that represents the width and height of this xtd::drawing::rectangle structure. 

overridevirtualnoexcept 
Converts the attributes of this xtd::drawing::rectangle to a humanreadable string.
Reimplemented from xtd::object.

noexcept 
Gets the ycoordinate of the top edge of this xtd::drawing::rectangle structure.

staticnoexcept 
Converts the specified xtd::drawing::rectangle_f to a xtd::drawing::rectangle by truncating the xtd::drawing::rectangle_f values.
rect  The xtd::drawing::rectangle_f to be converted. 

noexcept 
Gets the width of this xtd::drawing::rectangle structure.

noexcept 
Sets the width of this xtd::drawing::rectangle structure.
value  The width of this xtd::drawing::rectangle structure. The default is 0. 

noexcept 
Gets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure.

noexcept 
Sets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure.
value  The xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure. The default is 0. 

noexcept 
Gets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure.

noexcept 
Sets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure.
value  The ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure. The default is 0. 

static 
Represents a xtd::drawing::rectangle that has xtd::drawing::rectagle::x, xtd::drawing::rectangle::y, xtd::drawing::rectangle::width and xtd::drawing::rectangle::height values set to zero.