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:

ParameterTypeDescription
windowElectronBrowserWindow | nullThe window used to determine the display, or null.
rectElectronRectangleThe screen DIP rect to convert.

Returns: ElectronRectangleThe corresponding screen physical rect.

Platform: win32.