Struct Rect
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The Rect is a struct that represents the rectangular space.
[Obsolete("This has been deprecated in API12")]
public struct Rect : IEquatable<Rect>
- Implements
-
System.IEquatable<T><Rect>
Constructors
View SourceRect(int, int, int, int)
Creates and initializes a new instance of the Rect class.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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
View SourceBottom
Gets the extent along the Y-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Bottom { get; }
Property Value
Type | Description |
---|---|
int |
Height
Gets or sets the height of this rectangle.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Height { readonly get; set; }
Property Value
Type | Description |
---|---|
int |
Left
Gets the position of this rectangle on the X-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Left { get; }
Property Value
Type | Description |
---|---|
int |
Location
Gets the point defined by Rectangle.Left and Rectangle.Top.
Declaration
[Obsolete("This has been deprecated in API12")]
public Point Location { get; }
Property Value
Type | Description |
---|---|
Point |
Right
Gets the extent along the X-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Right { get; }
Property Value
Type | Description |
---|---|
int |
Size
Gets the extent of the rectangle along its X-axis and Y-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public Size Size { get; }
Property Value
Type | Description |
---|---|
Size |
Top
Gets the position of this rectangle on the Y-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Top { get; }
Property Value
Type | Description |
---|---|
int |
Width
Gets or sets the width of this rectangle.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Width { readonly get; set; }
Property Value
Type | Description |
---|---|
int |
X
Gets or sets the position of this rectangle on the X-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int X { readonly get; set; }
Property Value
Type | Description |
---|---|
int |
Y
Gets or sets the position of this rectangle on the Y-axis.
Declaration
[Obsolete("This has been deprecated in API12")]
public int Y { readonly get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceEquals(Rect)
Indicates whether this instance and a Rect object are equal.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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 |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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
GetHashCode()
Gets the hash code.
Declaration
[Obsolete("This has been deprecated in API12")]
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code. |
Overrides
ToString()
A human-readable representation of Rect.
Declaration
[Obsolete("This has been deprecated in API12")]
public override string ToString()
Returns
Type | Description |
---|---|
string | The string is formatted as "{{X={0} Y={1} Width={2} Height={3}}}". |
Overrides
Operators
View Sourceoperator ==(Rect, Rect)
Whether both Rect's are equal.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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. |
operator !=(Rect, Rect)
Whether both Rect's are not equal.
Declaration
[Obsolete("This has been deprecated in API12")]
public 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. |