Table of Contents

Class FixedDisplayScaleProvider

Namespace
Icy.Rendering.Display
Assembly
IcyUI.dll

An IDisplayScaleProvider that always reports the same scale.

public sealed class FixedDisplayScaleProvider : IDisplayScaleProvider
Inheritance
FixedDisplayScaleProvider
Implements
Inherited Members
Extension Methods

Remarks

Used as the fallback on platforms without a dedicated provider (see GetProvider()), and useful for tests or for forcing a scale.

Constructors

FixedDisplayScaleProvider(float)

Initializes a new instance of the FixedDisplayScaleProvider class.

public FixedDisplayScaleProvider(float scale = 1)

Parameters

scale float

The scale to report. Defaults to 1.0.

Exceptions

ArgumentOutOfRangeException

scale is not a finite number greater than zero.

Methods

GetScale(in NativeWindowInfo)

Gets the display scale of the specified window, where 1.0 means 96 DPI (100 %).

public float GetScale(in NativeWindowInfo window)

Parameters

window NativeWindowInfo

The native window to query.

Returns

float

The display scale. Implementations must not throw; they return 1.0 when the scale can't be determined.