Rectangle Structure
A rectangle defined by two opposite corners.
NuGet/Assembly: Carmenta.Engine.5.17.0.nupkg (in the CECore assembly)
Syntax
public struct Rectangle :
System.IEquatable<Rectangle>Remarks
A 2D rectangle defined by the points in the lower left corner and the upper right corner.
Platforms
Windows, Linux, Android
Rectangle Members
The Rectangle type has the following members.
Constructors
| Name | Description |
|---|---|
| Rectangle | Initializes a new instance of the Rectangle class. |
Properties
| Name | Description |
|---|---|
| Center | Gets the center point of the rectangle. |
| Gets an empty rectangle. | |
| Height | Gets the height of the rectangle. |
| Gets an infinite rectangle. | |
| IsEmpty | Gets a value that tells whether the Rectangle is empty. |
| Width | Gets the width of the rectangle. |
| XMax | Gets the x-coordinate of the right edge. |
| XMin | Gets the x-coordinate of the left edge. |
| YMax | Gets the y-coordinate of the top edge. |
| YMin | Gets the y-coordinate of the bottom edge. |
Methods
| Name | Description |
|---|---|
| ClipBy | Returns the Rectangle that results from clipping the current Rectangle with the specified Rectangle. |
| Equals | Overloaded. Determines whether two Rectangle objects have the same value. |
| Extend | Returns the Rectangle that results from extending the current Rectangle by the specified amounts. |
| GetHashCode | Returns the hash code for this Rectangle. |
| Inside | Tells whether a point is inside this rectangle (regarding border points as inside). |
| Determines whether two specified Rectangle objects have the same value. | |
| Determines whether two specified Rectangle objects have different values. | |
| Overlap | Tells whether this rectangle overlaps or touches another one. |
| StrictlyInside | Tells whether a point is inside this rectangle (regarding border points as outside). |
| StrictlyOverlap | Tells whether this rectangle overlaps another one (merely touching is not enough). |
| ToString | Converts this Rectangle to a human readable string. |