Rectangle Members
The following tables list the members exposed by the Rectangle type.
Public Constructors
Name | Description | |
---|---|---|
Rectangle | Initializes a new instance of Rectangle. |
Public Fields
Name | Description | |
---|---|---|
Height | Specifies the height of the rectangle. | |
Width | Specifies the width of the rectangle. | |
X | Specifies the x-coordinate of the rectangle. | |
Y | Specifies the y-coordinate of the rectangle. |
Public Properties
Name | Description | |
---|---|---|
Bottom | Returns the y-coordinate of the bottom of the rectangle. | |
Center | Gets the Point that specifies the center of the rectangle. | |
Empty | Returns a Rectangle with all of its values set to zero. | |
IsEmpty | Gets a value that indicates whether the Rectangle is empty. | |
Left | Returns the x-coordinate of the left side of the rectangle. | |
Location | Gets or sets the upper-left value of the Rectangle. | |
Right | Returns the x-coordinate of the right side of the rectangle. | |
Top | Returns the y-coordinate of the top of the rectangle. |
Public Methods
Name | Description | |
---|---|---|
Contains | Overloaded. Determines whether this Rectangle contains a specified point or Rectangle. | |
Equals | Overloaded. Returns a value that indicates whether the current instance is equal to a specified object. | |
GetHashCode | Gets the hash code for this object. | |
GetType | (Inherited from Object.) | |
Inflate | Pushes the edges of the Rectangle out by the horizontal and vertical values specified. | |
Intersect | Overloaded. Creates a Rectangle defining the area where one rectangle overlaps another rectangle. | |
Intersects | Overloaded. Determines whether a specified Rectangle intersects with this Rectangle. | |
Offset | Overloaded. Changes the position of the Rectangle. | |
op_Equality | Compares two rectangles for equality. | |
op_Inequality | Compares two rectangles for inequality. | |
ToString | Retrieves a string representation of the current object. | |
Union | Overloaded. Creates a new Rectangle that exactly contains two other rectangles. |
Protected Methods
Name | Description | |
---|---|---|
Finalize | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) |