Struct Rectangle
Represents the dimension of a rectangle.
Inherited Members
Namespace: GameOverlay.Drawing
Assembly: GameOverlay.dll
Syntax
public struct Rectangle
Constructors
| Improve this Doc View SourceRectangle(Int32, Int32, Int32, Int32)
Initializes a new Rectangle using the given coordinates.
Declaration
public Rectangle(int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
Int32 | left | The x-coordinate of the upper-left corner of the Rectangle. |
Int32 | top | The y-coordinate of the upper-left corner of the Rectangle. |
Int32 | right | The x-coordinate of the bottom-right corner of the Rectangle. |
Int32 | bottom | The y-coordinate of the bottom-right corner of the Rectangle. |
Rectangle(Single, Single, Single, Single)
Initializes a new Rectangle using the given coordinates.
Declaration
public Rectangle(float left, float top, float right, float bottom)
Parameters
Type | Name | Description |
---|---|---|
Single | left | The x-coordinate of the upper-left corner of the Rectangle. |
Single | top | The y-coordinate of the upper-left corner of the Rectangle. |
Single | right | The x-coordinate of the bottom-right corner of the Rectangle. |
Single | bottom | The y-coordinate of the bottom-right corner of the Rectangle. |
Fields
| Improve this Doc View SourceBottom
The y-coordinate of the bottom-right corner of the Rectangle.
Declaration
public float Bottom
Field Value
Type | Description |
---|---|
Single |
Left
The x-coordinate of the upper-left corner of the Rectangle.
Declaration
public float Left
Field Value
Type | Description |
---|---|
Single |
Right
The x-coordinate of the bottom-right corner of the Rectangle.
Declaration
public float Right
Field Value
Type | Description |
---|---|
Single |
Top
The y-coordinate of the upper-left corner of the Rectangle.
Declaration
public float Top
Field Value
Type | Description |
---|---|
Single |
Properties
| Improve this Doc View SourceHeight
Gets the height of this Rectangle.
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
Single |
Width
Gets the width of this Rectangle.
Declaration
public float Width { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
| Improve this Doc View SourceCreate(Int32, Int32, Int32, Int32)
Creates a new Rectangle structure using the given dimension.
Declaration
public static Rectangle Create(int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | The x-coordinate of the upper-left corner of the Rectangle. |
Int32 | y | The y-coordinate of the upper-left corner of the Rectangle. |
Int32 | width | The width of the rectangle. |
Int32 | height | The height of the rectangle |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle this method creates. |
Create(Single, Single, Single, Single)
Creates a new Rectangle structure using the given dimension.
Declaration
public static Rectangle Create(float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x-coordinate of the upper-left corner of the Rectangle. |
Single | y | The y-coordinate of the upper-left corner of the Rectangle. |
Single | width | The width of the rectangle. |
Single | height | The height of the rectangle |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle this method creates. |
Equals(Object)
Returns a value indicating whether this instance and a specified Object represent the same type and value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Overrides
| Improve this Doc View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Overrides
| Improve this Doc View SourceToString()
Converts this Rectangle structure to a human-readable string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this Rectangle. |
Overrides
Operators
| Improve this Doc View SourceEquality(Rectangle, Rectangle)
Determines whether two specified instances are equal.
Declaration
public static bool operator ==(Rectangle left, Rectangle right)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | left | The first object to compare. |
Rectangle | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Implicit(Rectangle to RawRectangleF)
Converts a Rectangle structure to a SharpDX RawRectangleF.
Declaration
public static implicit operator RawRectangleF(Rectangle rectangle)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | rectangle | A Rectangle structure. |
Returns
Type | Description |
---|---|
SharpDX.Mathematics.Interop.RawRectangleF |
Inequality(Rectangle, Rectangle)
Determines whether two specified instances are not equal.
Declaration
public static bool operator !=(Rectangle left, Rectangle right)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | left | The first object to compare. |
Rectangle | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |