Table of Contents

Struct DisplayMode

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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

Format PixelFormat

The pixel format of this display mode.

Width int

The screen width, in pixels.

Height int

The screen height, in pixels.

RefreshRate Rational

The 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

format PixelFormat

The pixel format of this display mode.

width int

The screen width, in pixels.

height int

The screen height, in pixels.

refreshRate uint

The refresh rate, in Hz.

Properties

AspectRatio

Gets the aspect ratio of this display mode.

public float AspectRatio { get; }

Property Value

float

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

PixelFormat

Height

The screen height, in pixels.

public int Height { get; init; }

Property Value

int

RefreshRate

The refresh rate, in Hz.

public Rational RefreshRate { get; init; }

Property Value

Rational

Width

The screen width, in pixels.

public int Width { get; init; }

Property Value

int