Struct Rect
Rectangle struct
Namespace: Terminaux.Base.Structures
Assembly: Terminaux.dll
Syntax
public struct Rect
Constructors
| Edit this page View SourceRect(int, int, int, int)
Makes a new rectangle instance
Declaration
public Rect(int width, int height, int x, int y)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | A zero-based width |
| int | height | A zero-based height |
| int | x | A zero-based X coordinate |
| int | y | A zero-based Y coordinate |
Rect(Size, Coordinate)
Makes a new rectangle instance
Declaration
public Rect(Size size, Coordinate coord)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | Zero-based width and height |
| Coordinate | coord | Zero-based X and Y coordinates |
Properties
| Edit this page View SourceCoordinate
Coordinate of the rectangle (starting point, upper left corner)
Declaration
public readonly Coordinate Coordinate { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate |
CoordinateEnd
Coordinate of the rectangle (ending point, lower right corner)
Declaration
public readonly Coordinate CoordinateEnd { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate |
CoordinateLowerLeft
Coordinate of the rectangle (lower left corner)
Declaration
public readonly Coordinate CoordinateLowerLeft { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate |
CoordinateUpperRight
Coordinate of the rectangle (upper right corner)
Declaration
public readonly Coordinate CoordinateUpperRight { get; }
Property Value
| Type | Description |
|---|---|
| Coordinate |
Size
Size of the rectangle
Declaration
public readonly Size Size { get; }
Property Value
| Type | Description |
|---|---|
| Size |
Methods
| Edit this page View SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
System.ValueType.Equals(object)
|
Edit this page
View Source
Equals(Rect)
Declaration
public bool Equals(Rect other)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
System.ValueType.GetHashCode()
|
Edit this page
View Source
ToString()
Generates a string containing rectangle info
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | Rectangle info in a string |
Overrides
System.ValueType.ToString()
Operators
| Edit this page View Sourceoperator ==(Rect, Rect)
Declaration
public static bool operator ==(Rect left, Rect right)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | left | |
| Rect | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(Rect, Rect)
Declaration
public static bool operator !=(Rect left, Rect right)
Parameters
| Type | Name | Description |
|---|---|---|
| Rect | left | |
| Rect | right |
Returns
| Type | Description |
|---|---|
| bool |