Struct GorgonVideoMode
Information about a full screen video mode provided by a IGorgonVideoOutputInfo.
Implements
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public readonly struct GorgonVideoMode : IGorgonEquatableByRef<GorgonVideoMode>, IEquatable<GorgonVideoMode>, IComparable<GorgonVideoMode>
Constructors
| Edit this page View SourceGorgonVideoMode(int, int, BufferFormat, GorgonRationalNumber?, ModeScaling, ModeScanlineOrder, bool)
Initializes a new instance of the GorgonVideoMode struct.
Declaration
public GorgonVideoMode(int width, int height, BufferFormat format, GorgonRationalNumber? refreshRate = null, ModeScaling scaling = ModeScaling.Unspecified, ModeScanlineOrder scanlineOrder = ModeScanlineOrder.Unspecified, bool steroSupport = false)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width of the mode, in pixels. |
int | height | The height of the mode, in pixels. |
BufferFormat | format | The pixel format for the mode. |
GorgonRationalNumber? | refreshRate | [Optional] The refresh rate for the video mode. |
ModeScaling | scaling | [Optional] The type of scaling supported. |
ModeScanlineOrder | scanlineOrder | [Optional] The scanline order supported. |
bool | steroSupport | [Optional] true if the mode should support stereo rendering, or false if not. |
Fields
| Edit this page View SourceFormat
The image buffer format for the display mode.
Declaration
public readonly BufferFormat Format
Field Value
Type | Description |
---|---|
BufferFormat |
Height
The height, in pixels, for the video mode.
Declaration
public readonly int Height
Field Value
Type | Description |
---|---|
int |
InvalidMode
A representation of an invalid video mode.
Declaration
public static readonly GorgonVideoMode InvalidMode
Field Value
Type | Description |
---|---|
GorgonVideoMode |
RefreshRate
The refresh rate represented as a rational number.
Declaration
public readonly GorgonRationalNumber RefreshRate
Field Value
Type | Description |
---|---|
GorgonRationalNumber |
Scaling
The type of scaling available to the video mode.
Declaration
public readonly ModeScaling Scaling
Field Value
Type | Description |
---|---|
ModeScaling |
ScanlineOrder
The type of scanline ordering performed when drawing the image on the display for this mode.
Declaration
public readonly ModeScanlineOrder ScanlineOrder
Field Value
Type | Description |
---|---|
ModeScanlineOrder |
SupportsStereo
Flag to indicate whether this mode supports stereo rendering.
Declaration
public readonly bool SupportsStereo
Field Value
Type | Description |
---|---|
bool |
Width
The width, in pixels, for the video mode.
Declaration
public readonly int Width
Field Value
Type | Description |
---|---|
int |
Properties
| Edit this page View SourceSize
Property to return the size for the video mode.
Declaration
public Size2 Size { get; }
Property Value
Type | Description |
---|---|
Size2 |
Methods
| Edit this page View SourceCompareTo(in GorgonVideoMode, in GorgonVideoMode)
Compares the left instance with the right object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Declaration
public static int CompareTo(in GorgonVideoMode left, in GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
int | A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero the left instance precedes the right in the sort order. Zero the left instance occurs in the same position in the sort order as the right. Greater than zero the left instance follows the right in the sort order. |
Equals(GorgonVideoMode)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(GorgonVideoMode other)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(in GorgonVideoMode)
Function to compare this instance with another.
Declaration
public bool Equals(in GorgonVideoMode other)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | other | The other instance to use for comparison. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
Equals(in GorgonVideoMode, in GorgonVideoMode)
Function to determine if two instances are equal or not.
Declaration
public static bool Equals(in GorgonVideoMode left, in GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left value to compare. |
GorgonVideoMode | right | The right value to compare. |
Returns
Type | Description |
---|---|
bool | true if the modes are equal, false if not. |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
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 |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
| Edit this page View Sourceoperator ==(GorgonVideoMode, GorgonVideoMode)
Operator to compare two instances for equality.
Declaration
public static bool operator ==(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if equal, false if not. |
operator >(GorgonVideoMode, GorgonVideoMode)
Operator to determine if the left instance is greater than the right instance.
Declaration
public static bool operator >(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if left is greater than the right, false if not. |
operator >=(GorgonVideoMode, GorgonVideoMode)
Operator to determine if the left instance is greater than or equal to the right instance.
Declaration
public static bool operator >=(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if left is greater than or equal to the right, false if not. |
operator !=(GorgonVideoMode, GorgonVideoMode)
Operator to compare two instances for inequality.
Declaration
public static bool operator !=(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if not equal, false if equal. |
operator <(GorgonVideoMode, GorgonVideoMode)
Operator to determine if the left instance is less than the right instance.
Declaration
public static bool operator <(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if left is less than the right, false if not. |
operator <=(GorgonVideoMode, GorgonVideoMode)
Operator to determine if the left instance is less than or equal to the right instance.
Declaration
public static bool operator <=(GorgonVideoMode left, GorgonVideoMode right)
Parameters
Type | Name | Description |
---|---|---|
GorgonVideoMode | left | The left instance to compare. |
GorgonVideoMode | right | The right instance to compare. |
Returns
Type | Description |
---|---|
bool | true if left is less than or equal to the right, false if not. |