|
Shift
|
Describes a 2D-rectangle. More...
Public Member Functions | |
| Rectangle (int x, int y, int width, int height) | |
| Creates a new instance of Rectangle struct, with the specified position, width, and height. More... | |
| Rectangle (Point location, Point size) | |
| Creates a new instance of Rectangle struct, with the specified location and size. More... | |
| bool | Contains (int x, int y) |
| Gets whether or not the provided coordinates lie within the bounds of this Rectangle. More... | |
| bool | Contains (float x, float y) |
| Gets whether or not the provided coordinates lie within the bounds of this Rectangle. More... | |
| bool | Contains (Point value) |
| Gets whether or not the provided Point lies within the bounds of this Rectangle. More... | |
| void | Contains (ref Point value, out bool result) |
| Gets whether or not the provided Point lies within the bounds of this Rectangle. More... | |
| bool | Contains (Vector2 value) |
| Gets whether or not the provided Vector2 lies within the bounds of this Rectangle. More... | |
| void | Contains (ref Vector2 value, out bool result) |
| Gets whether or not the provided Vector2 lies within the bounds of this Rectangle. More... | |
| bool | Contains (Rectangle value) |
| Gets whether or not the provided Rectangle lies within the bounds of this Rectangle. More... | |
| void | Contains (ref Rectangle value, out bool result) |
| Gets whether or not the provided Rectangle lies within the bounds of this Rectangle. More... | |
| override bool | Equals (object obj) |
| Compares whether current instance is equal to specified Object. More... | |
| bool | Equals (Rectangle other) |
| Compares whether current instance is equal to specified Rectangle. More... | |
| override int | GetHashCode () |
| Gets the hash code of this Rectangle. More... | |
| void | Inflate (int horizontalAmount, int verticalAmount) |
| Adjusts the edges of this Rectangle by specified horizontal and vertical amounts. More... | |
| void | Inflate (float horizontalAmount, float verticalAmount) |
| Adjusts the edges of this Rectangle by specified horizontal and vertical amounts. More... | |
| bool | Intersects (Rectangle value) |
| Gets whether or not the other Rectangle intersects with this rectangle. More... | |
| void | Intersects (ref Rectangle value, out bool result) |
| Gets whether or not the other Rectangle intersects with this rectangle. More... | |
| void | Offset (int offsetX, int offsetY) |
| Changes the Location of this Rectangle. More... | |
| void | Offset (float offsetX, float offsetY) |
| Changes the Location of this Rectangle. More... | |
| void | Offset (Point amount) |
| Changes the Location of this Rectangle. More... | |
| void | Offset (Vector2 amount) |
| Changes the Location of this Rectangle. More... | |
| override string | ToString () |
| Returns a String representation of this Rectangle in the format: {X:[X] Y:[Y] Width:[Width] Height:[Height]} More... | |
Static Public Member Functions | |
| static bool | operator== (Rectangle a, Rectangle b) |
| Compares whether two Rectangle instances are equal. More... | |
| static bool | operator!= (Rectangle a, Rectangle b) |
| Compares whether two Rectangle instances are not equal. More... | |
| static Rectangle | Intersect (Rectangle value1, Rectangle value2) |
| Creates a new Rectangle that contains overlapping region of two other rectangles. More... | |
| static void | Intersect (ref Rectangle value1, ref Rectangle value2, out Rectangle result) |
| Creates a new Rectangle that contains overlapping region of two other rectangles. More... | |
| static Rectangle | Union (Rectangle value1, Rectangle value2) |
| Creates a new Rectangle that completely contains two other rectangles. More... | |
| static void | Union (ref Rectangle value1, ref Rectangle value2, out Rectangle result) |
| Creates a new Rectangle that completely contains two other rectangles. More... | |
| static implicit | operator System.Drawing.Rectangle (Rectangle d) |
Public Attributes | |
| int | X |
| The x coordinate of the top-left corner of this Rectangle. More... | |
| int | Y |
| The y coordinate of the top-left corner of this Rectangle. More... | |
| int | Width |
| The width of this Rectangle. More... | |
| int | Height |
| The height of this Rectangle. More... | |
Static Public Attributes | |
| static readonly int | SizeInBytes = System.Runtime.InteropServices.Marshal.SizeOf(new Rectangle()) |
| Defines the size of the Rectangle struct in bytes. More... | |
Properties | |
| static Rectangle | Empty [get] |
| Returns a Rectangle with X=0, Y=0, Width=0, Height=0. More... | |
| int | Left [get] |
| Returns the x coordinate of the left edge of this Rectangle. More... | |
| int | Right [get] |
| Returns the x coordinate of the right edge of this Rectangle. More... | |
| int | Top [get] |
| Returns the y coordinate of the top edge of this Rectangle. More... | |
| int | Bottom [get] |
| Returns the y coordinate of the bottom edge of this Rectangle. More... | |
| bool | IsEmpty [get] |
| Whether or not this Rectangle has a Width and Height of 0, and a Location of (0, 0). More... | |
| Point | Location [get, set] |
| The top-left coordinates of this Rectangle. More... | |
| Point | Size [get, set] |
| The width-height coordinates of this Rectangle. More... | |
| Point | Center [get] |
| A Point located in the center of this Rectangle. More... | |
Describes a 2D-rectangle.
Definition at line 12 of file Rectangle.cs.
|
inline |
Creates a new instance of Rectangle struct, with the specified position, width, and height.
| x | The x coordinate of the top-left corner of the created Rectangle. |
| y | The y coordinate of the top-left corner of the created Rectangle. |
| width | The width of the created Rectangle. |
| height | The height of the created Rectangle. |
Definition at line 165 of file Rectangle.cs.
Creates a new instance of Rectangle struct, with the specified location and size.
| location | The x and y coordinates of the top-left corner of the created Rectangle. |
| size | The width and height of the created Rectangle. |
Definition at line 179 of file Rectangle.cs.
|
inline |
Gets whether or not the provided coordinates lie within the bounds of this Rectangle.
| x | The x coordinate of the point to check for containment. |
| y | The y coordinate of the point to check for containment. |
true if the provided coordinates lie inside this Rectangle; false otherwise.Definition at line 215 of file Rectangle.cs.
|
inline |
Gets whether or not the provided coordinates lie within the bounds of this Rectangle.
| x | The x coordinate of the point to check for containment. |
| y | The y coordinate of the point to check for containment. |
true if the provided coordinates lie inside this Rectangle; false otherwise.Definition at line 226 of file Rectangle.cs.
|
inline |
|
inline |
Gets whether or not the provided Point lies within the bounds of this Rectangle.
| value | The coordinates to check for inclusion in this Rectangle. |
| result | true if the provided Point lies inside this Rectangle; false otherwise. As an output parameter. |
Definition at line 246 of file Rectangle.cs.
|
inline |
|
inline |
Gets whether or not the provided Vector2 lies within the bounds of this Rectangle.
| value | The coordinates to check for inclusion in this Rectangle. |
| result | true if the provided Vector2 lies inside this Rectangle; false otherwise. As an output parameter. |
Definition at line 266 of file Rectangle.cs.
|
inline |
Gets whether or not the provided Rectangle lies within the bounds of this Rectangle.
Definition at line 276 of file Rectangle.cs.
|
inline |
Gets whether or not the provided Rectangle lies within the bounds of this Rectangle.
| value | The Rectangle to check for inclusion in this Rectangle. |
| result | true if the provided Rectangle's bounds lie entirely inside this Rectangle; false otherwise. As an output parameter. |
Definition at line 286 of file Rectangle.cs.
|
inline |
Compares whether current instance is equal to specified Object.
| obj | The Object to compare. |
true if the instances are equal; false otherwise.Definition at line 296 of file Rectangle.cs.
|
inline |
Compares whether current instance is equal to specified Rectangle.
| other | The Rectangle to compare. |
true if the instances are equal; false otherwise.Definition at line 306 of file Rectangle.cs.
|
inline |
Gets the hash code of this Rectangle.
Definition at line 315 of file Rectangle.cs.
|
inline |
Adjusts the edges of this Rectangle by specified horizontal and vertical amounts.
| horizontalAmount | Value to adjust the left and right edges. |
| verticalAmount | Value to adjust the top and bottom edges. |
Definition at line 325 of file Rectangle.cs.
|
inline |
Adjusts the edges of this Rectangle by specified horizontal and vertical amounts.
| horizontalAmount | Value to adjust the left and right edges. |
| verticalAmount | Value to adjust the top and bottom edges. |
Definition at line 338 of file Rectangle.cs.
Creates a new Rectangle that contains overlapping region of two other rectangles.
Definition at line 379 of file Rectangle.cs.
|
inlinestatic |
Creates a new Rectangle that contains overlapping region of two other rectangles.
| value1 | The first Rectangle. |
| value2 | The second Rectangle. |
| result | Overlapping region of the two rectangles as an output parameter. |
Definition at line 392 of file Rectangle.cs.
|
inline |
Gets whether or not the other Rectangle intersects with this rectangle.
| value | The other rectangle for testing. |
true if other Rectangle intersects with this rectangle; false otherwise.Definition at line 351 of file Rectangle.cs.
|
inline |
Gets whether or not the other Rectangle intersects with this rectangle.
| value | The other rectangle for testing. |
| result | true if other Rectangle intersects with this rectangle; false otherwise. As an output parameter. |
Definition at line 365 of file Rectangle.cs.
|
inline |
|
inline |
|
inline |
Changes the Location of this Rectangle.
| amount | The x and y components to add to this Rectangle. |
Definition at line 434 of file Rectangle.cs.
|
inline |
Changes the Location of this Rectangle.
| amount | The x and y components to add to this Rectangle. |
Definition at line 444 of file Rectangle.cs.
|
inlinestatic |
Definition at line 489 of file Rectangle.cs.
Compares whether two Rectangle instances are not equal.
| a | Rectangle instance on the left of the not equal sign. |
| b | Rectangle instance on the right of the not equal sign. |
true if the instances are not equal; false otherwise.Definition at line 204 of file Rectangle.cs.
Compares whether two Rectangle instances are equal.
| a | Rectangle instance on the left of the equal sign. |
| b | Rectangle instance on the right of the equal sign. |
true if the instances are equal; false otherwise.Definition at line 193 of file Rectangle.cs.
|
inline |
Creates a new Rectangle that completely contains two other rectangles.
Definition at line 466 of file Rectangle.cs.
|
inlinestatic |
Creates a new Rectangle that completely contains two other rectangles.
| value1 | The first Rectangle. |
| value2 | The second Rectangle. |
| result | The union of the two rectangles as an output parameter. |
Definition at line 481 of file Rectangle.cs.
| int Shift.Rectangle.Height |
The height of this Rectangle.
Definition at line 51 of file Rectangle.cs.
|
static |
Defines the size of the Rectangle struct in bytes.
Definition at line 17 of file Rectangle.cs.
| int Shift.Rectangle.Width |
The width of this Rectangle.
Definition at line 45 of file Rectangle.cs.
| int Shift.Rectangle.X |
The x coordinate of the top-left corner of this Rectangle.
Definition at line 33 of file Rectangle.cs.
| int Shift.Rectangle.Y |
The y coordinate of the top-left corner of this Rectangle.
Definition at line 39 of file Rectangle.cs.
|
get |
Returns the y coordinate of the bottom edge of this Rectangle.
Definition at line 81 of file Rectangle.cs.
|
get |
|
staticget |
Returns a Rectangle with X=0, Y=0, Width=0, Height=0.
Definition at line 25 of file Rectangle.cs.
|
get |
|
get |
Returns the x coordinate of the left edge of this Rectangle.
Definition at line 57 of file Rectangle.cs.
|
getset |
The top-left coordinates of this Rectangle.
Definition at line 101 of file Rectangle.cs.
|
get |
Returns the x coordinate of the right edge of this Rectangle.
Definition at line 65 of file Rectangle.cs.
|
getset |
The width-height coordinates of this Rectangle.
Definition at line 117 of file Rectangle.cs.
|
get |
Returns the y coordinate of the top edge of this Rectangle.
Definition at line 73 of file Rectangle.cs.