Struct Rect
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Rect is a struct that represents the rectangular space.
C#Copypublic struct Rect : IEquatable<Rect>
- Implements
-
System.IEquatable<T><Rect>
Constructors
Declaration
C#Copypublic Rect(int x, int y, int w, int h)
Parameters
Type | Name | Description |
---|---|---|
int | x | X-axis value. |
int | y | Y-axis value. |
int | w | Width value. |
int | h | Height value. |
Properties
Declaration
C#Copypublic int Bottom { get; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Height { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Left { get; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic Point Location { get; }
Property Value
Type | Description |
---|---|
Point |
Declaration
C#Copypublic int Right { get; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic Size Size { get; }
Property Value
Type | Description |
---|---|
Size |
Declaration
C#Copypublic int Top { get; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Width { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Declaration
C#Copypublic int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
Declaration
C#Copypublic bool Equals(Rect other)
Parameters
Type | Name | Description |
---|---|---|
Rect | other | The Rect to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if the object and this instance are of the same type and represent the same value, otherwise, false |
Declaration
C#Copypublic override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if the object and this instance are of the same type and represent the same value, otherwise false. |
Overrides
System.ValueType.Equals(object)
Declaration
C#Copypublic override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code. |
Overrides
System.ValueType.GetHashCode()
Declaration
C#Copypublic override string ToString()
Returns
Type | Description |
---|---|
string | The string is formatted as "{{X={0} Y={1} Width={2} Height={3}}}". |
Overrides
System.ValueType.ToString()
Operators
Declaration
C#Copypublic static bool operator ==(Rect r1, Rect r2)
Parameters
Type | Name | Description |
---|---|---|
Rect | r1 | A Rect on the left hand side. |
Rect | r2 | A Rect on the right hand side. |
Returns
Type | Description |
---|---|
bool | True if both Rect's have equal values. |
Declaration
C#Copypublic static bool operator !=(Rect r1, Rect r2)
Parameters
Type | Name | Description |
---|---|---|
Rect | r1 | A Rect on the left hand side. |
Rect | r2 | A Rect on the right hand side. |
Returns
Type | Description |
---|---|
bool | True if both Rect's do not have equal values. |
Implements
System.IEquatable<T>