Struct VRect<T>
Represents a rectangle.
Inherited Members
Namespace: VMS.TPS.Common.Model.Types
Assembly: VMS.TPS.Common.Model.Types.dll
Syntax
public struct VRect<T>
where T : struct
Type Parameters
| Name | Description |
|---|---|
| T | Type of the values in the rectangle. |
Remarks
Currently limited to value types.
Constructors
VRect(T, T, T, T)
Constructs a VRect.
Declaration
public VRect(T x1, T y1, T x2, T y2)
Parameters
| Type | Name | Description |
|---|---|---|
| T | x1 | X1 coordinate of the rectangle. |
| T | y1 | Y1 coordinate of the rectangle. |
| T | x2 | X2 coordinate of the rectangle. |
| T | y2 | Y2 coordinate of the rectangle. |
Properties
X1
The X1-coordinate of the rectangle.
Declaration
public readonly T X1 { get; }
Property Value
| Type | Description |
|---|---|
| T |
X2
The X2-coordinate of the rectangle.
Declaration
public readonly T X2 { get; }
Property Value
| Type | Description |
|---|---|
| T |
Y1
The Y1-coordinate of the rectangle.
Declaration
public readonly T Y1 { get; }
Property Value
| Type | Description |
|---|---|
| T |
Y2
The Y2-coordinate of the rectangle.
Declaration
public readonly T Y2 { get; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
Equals(Object)
Checks if this object is equal to another object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | The other object to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if this object equals to the other object. Otherwise false. |
Overrides
Equals(VRect<T>)
Checks if this object is equal to another VRect object.
Declaration
public bool Equals(VRect<T> other)
Parameters
| Type | Name | Description |
|---|---|---|
| VRect<T> | other | The other object to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if this object equals to the other object. Otherwise false. |
GetHashCode()
Returns the hash code for this instance. Overrides Object.GetHashCode.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | The hash code for this instance. |
Overrides
ToString()
A string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string that represents the current object. |
Overrides
Operators
Equality(VRect<T>, VRect<T>)
Equality operator for VRect.
Declaration
public static bool operator ==(VRect<T> a, VRect<T> b)
Parameters
| Type | Name | Description |
|---|---|---|
| VRect<T> | a | The first object to compare. |
| VRect<T> | b | The second object to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if left is equal to right. Otherwise false. |
Inequality(VRect<T>, VRect<T>)
Inequality operator for VRect.
Declaration
public static bool operator !=(VRect<T> a, VRect<T> b)
Parameters
| Type | Name | Description |
|---|---|---|
| VRect<T> | a | The first object to compare. |
| VRect<T> | b | The second object to compare. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if left is not equal to right. Otherwise false. |