Skip to content

ElectronScreen.screenToDipRect method

ElectronScreen › screenToDipRect

Unofficial

Converts a screen physical rect to a screen DIP 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:

screenToDipRect(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 physical rect to convert.

Returns: ElectronRectangleThe corresponding screen DIP rect.

Platform: win32.