Skip to content

ElectronScreen.dipToScreenRect method

ElectronScreen › dipToScreenRect

Unofficial

Converts a screen DIP rect to a screen physical rect. The DPI scale is performed relative to the display nearest to window. If window is null, scaling will be performed to the display nearest to rect.

Signature:

dipToScreenRect(window: ElectronBrowserWindow | null, rect: ElectronRectangle): ElectronRectangle

Parameters:

Parameter Type Description
window ElectronBrowserWindow | null The window used to determine the display, or null.
rect ElectronRectangle The screen DIP rect to convert.

Returns: ElectronRectangleThe corresponding screen physical rect.

Platform: win32.