Rectangle Structure
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Defines a rectangle.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in Microsoft.Xna.Framework.dll)
Syntax
'Declaration
Public Structure Rectangle
public struct Rectangle
The Rectangle type exposes the following members.
Properties
Name | Description | |
---|---|---|
Bottom | Gets the y-coordinate of the bottom of the rectangle. | |
Empty | Gets a Rectangle with all of its values set to zero. | |
IsEmpty | Gets a value that indicates whether the rectangle is empty. | |
Left | Gets the x-coordinate of the left side of the rectangle. | |
Right | Gets the x-coordinate of the right side of the rectangle. | |
Top | Gets the y-coordinate of the top of the rectangle. |
Top
Methods
Name | Description | |
---|---|---|
Equals(Object) | Determines whether the specified Object is equal to the Rectangle. (Overrides ValueType.Equals(Object).) | |
Equals(Rectangle) | Determines whether the current instance is equal to a specified object. | |
GetHashCode | Gets the hash code for this object. (Overrides ValueType.GetHashCode().) | |
ToString | Retrieves a string representation of the current object. (Overrides ValueType.ToString().) |
Top
Operators
Name | Description | |
---|---|---|
Equality | Compares two rectangles for equality. | |
Inequality | Compares two rectangles for inequality. |
Top
Fields
Name | Description | |
---|---|---|
Height | Specifies the x-coordinate of the rectangle. | |
Width | Specifies the width of the rectangle. | |
X | Specifies the x-coordinate of the rectangle. | |
Y | Specifies the y-coordinate of the rectangle. |
Top
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.