Docs / Capabilities

Glossary: Display

The members of Display, in alphabetical order.

Color legend plain property method

A display on the desktop: which one it is, where it is, how it is set and every mode it can be set to.

A sealed record, in the namespace BorrowedTorch.Capabilities, compared by its values, its lists by reference; its properties can be set with an initializer or with. Displays.List makes them, read once: a display plugged in, moved or set otherwise shows in the next list. Sizes and positions are in the displays’ own pixels. The displays page and the resolutions and modes page show it in context, with code.

Names are colored by what they are: a property or a method; values and fields keep the plain color.

Properties

Bounds →

PixelRectangle · Where the display is on the desktop, and its size, in the displays’ own pixels: the primary display’s top left corner is 0, 0.

CurrentMode →

DisplayMode · The mode the display is set to: its size, its refresh rate in whole hertz and its color depth. A display turned to portrait has its size as turned.

DeviceName →

string · The name Windows gives the display’s place on the desktop, \\.\DISPLAY1: the text MonoGame’s GraphicsAdapter.DeviceName and Windows Forms’ Screen.DeviceName give, to tell displays apart by and to save the player’s display by.

Dpi →

int · The DPI Windows scales the display’s windows for: 96 at 100 %, 144 at 150 %. 96 where Windows doesn’t tell it.

IsBuiltIn →

bool · A panel built into the machine, a laptop’s or a tablet’s, rather than a monitor plugged in: one connected internally, or by embedded DisplayPort or UDI.

IsPrimary →

bool · The main display (Settings’ “Make this my main display”), the one whose top left corner is 0, 0.

Modes →

IReadOnlyList<DisplayMode> · Every mode the display can be set to, the ones Windows offers for it, which its card and its monitor both take: each once, biggest first, then fastest, then deepest. Empty for a display made without them.

Name →

string · The monitor’s own name, from what it tells the machine (DELL U2720Q); Windows’ name for its driver where it tells none (Generic PnP Monitor), as many panels built into laptops don’t; DeviceName where neither is known.

Orientation →

DisplayOrientation · How the display is turned.

RefreshRate →

double · How many times a second the display is drawn now, in hertz: exactly where Windows’ display configuration tells it (59.94 rather than the 59 of CurrentMode), the current mode’s whole number where it doesn’t.

Resolutions →

IReadOnlyList<Resolution> · Read-only. The sizes of Modes, each once, biggest first: a game’s resolution setting.

Scale →

float · Read-only. Settings’ scale of the display (System, Display, Scale), as a factor: Dpi / 96, 1.5 for 150 %.

VideoCardLuid →

long · The LUID of the video card the display is driven by (VideoCard.Luid), 0 where Windows doesn’t say. On a laptop with two cards that is often the one built into the processor, whichever card draws the game.

WorkArea →

PixelRectangle · Bounds without the taskbar and the bars docked to the display’s edges: where a window fits whole.

Methods

RefreshRatesAt(Resolution) →

RefreshRatesAt(Resolution resolution) · Returns the refresh rates the display has at a size, in whole hertz, each once, fastest first: empty for a size it has no mode of.

Parameter Type Description
resolution Resolution The size: one of Resolutions, or any other.