Gorgon
Show / Hide Table of Contents

Struct GorgonVideoMode

Information about a full screen video mode provided by a IGorgonVideoOutputInfo.

Implements
IGorgonEquatableByRef<GorgonVideoMode>
IEquatable<GorgonVideoMode>
IComparable<GorgonVideoMode>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
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 Source

GorgonVideoMode(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 Source

Format

The image buffer format for the display mode.

Declaration
public readonly BufferFormat Format
Field Value
Type Description
BufferFormat
| Edit this page View Source

Height

The height, in pixels, for the video mode.

Declaration
public readonly int Height
Field Value
Type Description
int
| Edit this page View Source

InvalidMode

A representation of an invalid video mode.

Declaration
public static readonly GorgonVideoMode InvalidMode
Field Value
Type Description
GorgonVideoMode
| Edit this page View Source

RefreshRate

The refresh rate represented as a rational number.

Declaration
public readonly GorgonRationalNumber RefreshRate
Field Value
Type Description
GorgonRationalNumber
| Edit this page View Source

Scaling

The type of scaling available to the video mode.

Declaration
public readonly ModeScaling Scaling
Field Value
Type Description
ModeScaling
| Edit this page View Source

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
| Edit this page View Source

SupportsStereo

Flag to indicate whether this mode supports stereo rendering.

Declaration
public readonly bool SupportsStereo
Field Value
Type Description
bool
| Edit this page View Source

Width

The width, in pixels, for the video mode.

Declaration
public readonly int Width
Field Value
Type Description
int

Properties

| Edit this page View Source

Size

Property to return the size for the video mode.

Declaration
public Size2 Size { get; }
Property Value
Type Description
Size2

Methods

| Edit this page View Source

CompareTo(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.

| Edit this page View Source

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 other parameter; otherwise, false.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

GetHashCode()

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
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

IGorgonEquatableByRef<T>
IEquatable<T>
IComparable<T>

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author