Struct DisplayResolution
Represents a display resolution.
Implements
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public readonly struct DisplayResolution : IEquatable<DisplayResolution>
Constructors
DisplayResolution(int, int)
Initializes a new instance of the DisplayResolution struct with the specified vertical and horizontal resolution.
Declaration
public DisplayResolution(int resolutionX, int resolutionY)
Parameters
| Type | Name | Description |
|---|---|---|
| int | resolutionX | The horizontal resolution. |
| int | resolutionY | The vertical resolution. |
Fields
ResolutionX
The horizontal resolution in pixels.
Declaration
public readonly int ResolutionX
Field Value
| Type | Description |
|---|---|
| int |
ResolutionY
The vertical resolution in pixels.
Declaration
public readonly int ResolutionY
Field Value
| Type | Description |
|---|---|
| int |
Methods
Equals(DisplayResolution)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(DisplayResolution other)
Parameters
| Type | Name | Description |
|---|---|---|
| DisplayResolution | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
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
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
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
Operators
operator ==(DisplayResolution, DisplayResolution)
Declaration
public static bool operator ==(DisplayResolution left, DisplayResolution right)
Parameters
| Type | Name | Description |
|---|---|---|
| DisplayResolution | left | |
| DisplayResolution | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(DisplayResolution, DisplayResolution)
Declaration
public static bool operator !=(DisplayResolution left, DisplayResolution right)
Parameters
| Type | Name | Description |
|---|---|---|
| DisplayResolution | left | |
| DisplayResolution | right |
Returns
| Type | Description |
|---|---|
| bool |