Stores a set of four integers that represent the location and size of a rectangle.
Public Member Functions  
void  inflate (const drawing::size &sz) noexcept 
Enlarges this xtd::drawing::rectangle by the specified amount.  
void  inflate (int32 width, int32 height) noexcept 
Enlarges this xtd::drawing::rectangle by the specified amount.  
Public Member Functions inherited from xtd::object  
object ()=default  
Create a new instance of the ultimate base class object.  
bool  equals (const object &obj) const noexcept 
Determines whether the specified object is equal to the current object.  
virtual size_t  get_hash_code () const noexcept 
Serves as a hash function for a particular type.  
virtual type_object  get_type () const noexcept 
Gets the type of the current instance.  
template<typename object_t >  
std::unique_ptr< object_t >  memberwise_clone () const noexcept 
Creates a shallow copy of the current object.  
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.  
Public 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.  
Public Constructors  
rectangle () noexcept=default  
Initializes a new instance of the xtd::drawing::rectangle class.  
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.  
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.  
Public 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.  
point  center () const noexcept 
Gets the center property values of this xtd::drawing::rectangle structure.  
int32  height () const noexcept 
Gets the height of this xtd::drawing::rectangle structure.  
void  height (int32 value) noexcept 
Sets the height of this xtd::drawing::rectangle structure.  
bool  is_empty () const noexcept 
Tests whether all numeric properties of this xtd::drawing::rectangle have values of zero.  
int32  left () const noexcept 
Gets the xcoordinate of the left edge of this xtd::drawing::rectangle structure.  
xtd::drawing::point  location () const noexcept 
Gets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure.  
void  location (const xtd::drawing::point &value) noexcept 
Sets the coordinates of the upperleft corner of this xtd::drawing::rectangle structure.  
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.  
xtd::drawing::size  size () const noexcept 
Gets the size of this xtd::drawing::rectangle.  
void  size (const xtd::drawing::size &value) noexcept 
Sets the size of this xtd::drawing::rectangle.  
int32  top () const noexcept 
Gets the ycoordinate of the top edge of this xtd::drawing::rectangle structure.  
int32  width () const noexcept 
Gets the width of this xtd::drawing::rectangle structure.  
void  width (int32 value) noexcept 
Sets the width of this xtd::drawing::rectangle structure.  
int32  x () const noexcept 
Gets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure.  
void  x (int32 value) noexcept 
Sets the xcoordinate of the upperleft corner of this xtd::drawing::rectangle structure.  
int32  y () const noexcept 
Gets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure.  
void  y (int32 value) noexcept 
Sets the ycoordinate of the upperleft corner of this xtd::drawing::rectangle structure.  
Public Methods  
void  add (const drawing::size &sz) noexcept 
Adds this xtd::drawing::rectangle by the specified amount.  
void  add (int32 width, int32 height) noexcept 
Adds this xtd::drawing::rectangle by the specified amount.  
bool  contains (const xtd::drawing::point &pt) const noexcept 
Determines if the specified point is contained within this xtd::drawing::rectangle structure.  
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.  
bool  contains (int32 x, int32 y) const noexcept 
Determines if the specified point is contained within this xtd::drawing::rectangle structure.  
bool  equals (const rectangle &value) const noexcept override 
bool  intersects_with (const rectangle &rect) const noexcept 
Determines if this rectangle intersects with rect.  
void  make_intersect (const rectangle &rect) noexcept 
Replaces this xtd::drawing::rectangle with the intersection of itself and the specified xtd::drawing::rectangle.  
void  make_union (const rectangle &rect) noexcept 
Replaces this xtd::drawing::rectangle with the union of itself and the specified xtd::drawing::rectangle.  
void  offset (const point &pos) noexcept 
Adjusts the location of this rectangle by the specified amount.  
void  offset (int32 x, int32 y) noexcept 
Adjusts the location of this rectangle by the specified amount.  
xtd::ustring  to_string () const noexcept override 
Converts the attributes of this xtd::drawing::rectangle to a humanreadable string.  
Public Static Methods  
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.  
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.  
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.  
static rectangle  from_ltrb (int32 left, int32 top, int32 right, int32 bottom) noexcept 
Creates a xtd::drawing::rectangle structure with the specified edge locations.  
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.  
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.  
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.  
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.  
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.  
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.  
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.  
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.  
Additional Inherited Members  
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.  
static bool  reference_equals (const object &object_a, const object &object_b) noexcept 
Determines whether the specified object instances are the same instance.  

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. 

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. 

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. 
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. 

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 
Gets the center property values of this xtd::drawing::rectangle structure.

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. 

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. 

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. 
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. 

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. 

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. 
Adjusts the location of this rectangle by the specified amount.
x  The horizontal offset. 
y  The vertical offset. 

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.