The Rectangle type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Rectangle()()()() |
Create an empty rectangle at position (0,0).
| |
| Rectangle(Rectangle) |
Create a rectangle from a System.Drawing.RectangleF.
| |
| Rectangle(RectangleF) |
Create a rectangle from a System.Drawing.RectangleF.
| |
| Rectangle(Rectangle) |
Create a rectangle from a Rectangle.
| |
| Rectangle(Rectangle, Transform) |
Create a rectangle from an existing rectangle.
| |
| Rectangle(Double, Double, Double, Double) |
Create new rectangle at the given position and with the specified
width and height.
| |
| Rectangle(Double, Double, Double, Double, Transform) |
Create a rectangle with the given position and size, and apply the given transformation to it.
|
Methods
| Name | Description | |
|---|---|---|
| Contains(Point) |
Tests whether the given coordinate is inside the rectangle.
| |
| Contains(Rectangle) |
Tests whether the given rectangle is contained in this one.
| |
| CreateGdiRectangle |
Converts the rectangle to the System.Drawing.Rectangle equivalent
| |
| CreateGdiRectangleF |
Converts the rectangle to the System.Drawing.RectangleF equivalent
| |
| Equals |
Returns true if the argument object equals this rectangle.
(Overrides Object..::..Equals(Object).) | |
| GetHashCode |
Returns the hash code for this instance.
(Overrides Object..::..GetHashCode()()()().) | |
| IntersectsWith |
Tests whether the given rectangle intersects with this one.
|
Operators
| Name | Description | |
|---|---|---|
| Equality |
Compares two rectangles.
| |
| Inequality |
Compares two rectangles.
|
Properties
| Name | Description | |
|---|---|---|
| Height |
Height of the rectangle
| |
| Width |
Width of the rectangle
| |
| X |
X coordinate of the rectangle
| |
| Y |
Y coordinate of the rectangle
|