Rectangle Class
Stores the location and size of a rectangular region with ineteger parameters. This class cannot be inherited.
Definition
| public sealed class Rectangle: Object |
Members Table
The following table lists the members exposed by the Rectangle object. Click a tab on the left to choose the type of member you want to view.
Methods
| Method | Description |
|---|
| Ceiling | Converts the specified RectangleF object to a Rectangle object by rounding the RectangleF values to the next higher integer values. |
| Contains | Overloaded. Determines if the specified point or rectangular region is contained within the rectangular region defined by this Rectangle. |
| Equals | Overloaded. Compares two objects to determine if they are equal. |
| FromLTRB | Creates a Rectangle object with the specified edge locations. |
| GetHashCode | Overriden. Returns the hash code for this Rectangle object. |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| Inflate | Overloaded. Inflates a rectangular region by a specified amount. |
| Intersect | Overloaded. Returns a Rectangle object that represents the intersection of two rectangles. If there is no intersection, null is returned. |
| IntersectsWith | Determines if this rectangle intersects with a specified Rectangle. |
| Offset | Overloaded. Adjusts the location of this rectangle by the specified amount. |
| Rectangle | Overloaded. Initializes a new instance of Rectangle. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (Inherited from Object) |
| Round | Converts the specified RectangleF to a Rectangle by rounding the RectangleF values to the nearest integer values. |
| ToString | Overriden. Converts the attributes of this Rectangle to a human-readable string. |
| Truncate | Converts the specified RectangleF to a Rectangle by truncating the RectangleF values. |
| Union | Gets a Rectangle object that contains the union of two Rectangle objects. |
Properties
| Property | Description |
|---|
| Bottom | Gets the y-coordinate of the bottom edge of this Rectangle object. |
| Empty | Represents a Rectangle object with its properties left uninitialized. |
| Height | Gets or sets the height of this Rectangle object. |
| IsEmpty | Gets a value indicating whether all numeric properties of this Rectangle have values of zero. |
| Left | Gets the x-coordinate of the left edge of this Rectangle object. |
| Location | Gets or sets the coordinates of the upper-left corner of this Rectangle object. |
| Right | Gets the x-coordinate of the right edge of this Rectangle object. |
| Size | Gets or sets the size of this Rectangle. |
| Top | Gets the y-coordinate of the top edge of this Rectangle object. |
| Width | Gets or sets the width of this Rectangle object. |
| X | Gets or sets the horizontal coordinate of the upper-left corner of this Rectangle object. |
| Y | Gets or sets the vertcial coordinate of the upper-left corner of this Rectangle object. |
Operators
| Operator | Description |
|---|
| operator != | Tests whether two Rectangle objects differ in location or size. |
| operator == | Tests whether two Rectangle objects have equal location and size. |
Inheritance Hierarchy
ObjectRectangle
Class Information
| Namespace | System.Drawing |
|---|
| Flash Library | System.Drawing.scl |
|---|
| Flash Library Version | 2.0.0.1291 |
|---|
| Silverlight Library | System.Windows.Forms.dll |
|---|