FDisplayMetrics

Contains metrics information for the desktop area

Choose your operating system:

Windows

macOS

Linux

References

Module

ApplicationCore

Header

/Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/GenericApplication.h

Include

#include "GenericPlatform/GenericApplication.h"

Syntax

struct FDisplayMetrics

Remarks

Contains metrics information for the desktop area

Variables

Name Description

Public variable

FVector4

 

ActionSafePaddingSize

The safe area for less important spill over on TVs (see TitleSafePaddingSize)

Public variable

TArray< FMonito...

 

MonitorInfo

Info on connected physical monitors.

Public variable

int32

 

PrimaryDisplayHeight

Height of the primary display in pixels

Public variable

int32

 

PrimaryDisplayWidth

Width of the primary display in pixels

Public variable

FPlatformRect

 

PrimaryDisplayWorkAreaRect

Area of the primary display not covered by task bars or other docked widgets

Public variable

FVector4

 

TitleSafePaddingSize

The safe area for all content on TVs (see http://en.wikipedia.org/wiki/Safe_area_%28television%29) - content will be inset Left - X Top - Y Right - Z Bottom - W

Public variable

FPlatformRect

 

VirtualDisplayRect

Virtual display coordinate range (includes all active displays)

Constructors

Name Description

Public function

FDisplayMetrics()

Functions

Name Description

Protected function

void

 

ApplyDefaultSafeZones()

Apply the debug/default safe zones.

Protected function Static

float

 

GetDebugActionSafeZoneRatio()

The action safe zone ratio that will be returned by FDisplayMetrics::GetDisplayMetrics on platforms that don't have a defined safe zone.

Public function Static

float

 

GetDebugTitleSafeZoneRatio()

The title safe zone ratio that will be returned by FDisplayMetrics::GetDisplayMetrics on platforms that don't have a defined safe zone.

Public function Const

FPlatformRec...

 

GetMonitorWorkAreaFromPoint

(
    const FVector2D& Point
)

Gets the monitor work area from a position in the global display rect

Public function Const

void

 

PrintToLog()

Logs out display metrics

Public function Static

void

 

RebuildDisplayMetrics

(
    FDisplayMetrics& OutDisplayMetrics
)

Deprecated Functions

Name Description

Public function Static

void

 

GetDisplayMetrics

(
    FDisplayMetrics& OutDisplayMetrics
)

Please use RebuildDisplayMetrics - it is functionally the same but is clearer about the function cost