[]
Stores a set of four integers that represent the coordinates of a rectangle.
public struct Rectangle
Public Structure Rectangle
Name | Description |
---|---|
Rectangle(Point, Size) | Initializes a new instance of the Rectangle struct with the specified coordinates and size. |
Rectangle(double, double, double, double) | Initializes a new instance of the Rectangle struct with the specified coordinates. |
Name | Description |
---|---|
Empty | Represents a Rectangle structure with its properties left uninitialized. |
Invalid | Represents an invalid Rectangle structure. |
Name | Description |
---|---|
Bottom | Gets the y-coordinate that is the sum of Top and Height property values of this Rectangle structure. |
Height | Gets or sets the height of this Rectangle structure. |
IsEmpty | Determines whether this Rectangle is empty. |
IsInvalid | Determines whether this Rectangle is invalid. |
Left | Gets the x-coordinate of the left edge of this Rectangle structure. |
Location | Gets or sets the coordinates of the upper-left corner of this Rectangle structure. |
Right | Gets the x-coordinate that is the sum of Left and Width property values of this Rectangle structure. |
Size | Gets a Size value that represents the width and height of this Rectangle structure. |
Top | Gets the y-coordinate of the top edge of this Rectangle structure. |
Width | Gets or sets the width of this Rectangle structure. |
X | Gets or sets the x-coordinate of the left edge of this Rectangle structure. |
Y | Gets or sets the y-coordinate of the top edge of this Rectangle structure. |
Name | Description |
---|---|
Contains(double, double) | Determines if the specified point is contained within this Rectangle structure. |
GetAlignRectangle(double, double, RectAlignment) | Gets the aligned rectangle. |
Inflate(double, double) | Enlarges a Rectangle structure by the specified amount. |
Intersect(Rectangle, Rectangle) | Creates a rectangle that represents the intersetion between a and b. If there is no intersection, null is returned. |
IntersectsWith(Rectangle) | Determines if this rectangle intersects with |
Offset(Point) | Adjusts the location of this rectangle by the specified amount. |
Offset(double, double) | Adjusts the location of this rectangle by the specified amount. |
Round() | Rounds all boundaries to the nearest integral value. |
Scale(double, double) | Scales this Rectangle value by the specified |
ToRect() | Converts to Rect value. |
Translate(double, double) | Translates this rectangle by the specified amount of distance. |
Union(Rectangle) | Unions the specified Rectangle value with this Rectangle value. |
Union(Rectangle, Rectangle) | Gets a Rectangle structure that contains the union of two Rectangle structures. |