Struct DisplayMode
Describes a display mode.
public readonly record struct DisplayMode : IEquatable<DisplayMode>
- Implements
- Inherited Members
- Extension Methods
Constructors
DisplayMode(PixelFormat, int, int, Rational)
Describes a display mode.
public DisplayMode(PixelFormat Format, int Width, int Height, Rational RefreshRate)
Parameters
FormatPixelFormatThe pixel format of this display mode.
WidthintThe screen width, in pixels.
HeightintThe screen height, in pixels.
RefreshRateRationalThe refresh rate, in Hz.
DisplayMode(PixelFormat, int, int, uint)
Initializes a new instance of the DisplayMode record.
public DisplayMode(PixelFormat format, int width, int height, uint refreshRate)
Parameters
formatPixelFormatThe pixel format of this display mode.
widthintThe screen width, in pixels.
heightintThe screen height, in pixels.
refreshRateuintThe refresh rate, in Hz.
Properties
AspectRatio
Gets the aspect ratio of this display mode.
public float AspectRatio { get; }
Property Value
Remarks
The aspect ratio is the ratio of the display mode's Width in relation to the Height,
i.e. Width / Height.
Format
The pixel format of this display mode.
public PixelFormat Format { get; init; }
Property Value
Height
The screen height, in pixels.
public int Height { get; init; }
Property Value
RefreshRate
The refresh rate, in Hz.
public Rational RefreshRate { get; init; }
Property Value
Width
The screen width, in pixels.
public int Width { get; init; }