A size represented in physical pixels.
Physical pixels represent actual screen pixels, and are DPI-independent. For high-DPI windows, this means that any point in the window on the screen will have a different position in logical pixels (@linkcode LogicalSize).
For physical-pixel-based position, see PhysicalPosition.
PhysicalPosition
2.0.0
Readonly
Converts the physical size to a logical one.
import { getCurrentWindow } from '@tauri-apps/api/window';const appWindow = getCurrentWindow();const factor = await appWindow.scaleFactor();const size = await appWindow.innerSize(); // PhysicalSizeconst logical = size.toLogical(factor); Copy
import { getCurrentWindow } from '@tauri-apps/api/window';const appWindow = getCurrentWindow();const factor = await appWindow.scaleFactor();const size = await appWindow.innerSize(); // PhysicalSizeconst logical = size.toLogical(factor);
A size represented in physical pixels.
Physical pixels represent actual screen pixels, and are DPI-independent. For high-DPI windows, this means that any point in the window on the screen will have a different position in logical pixels (@linkcode LogicalSize).
For physical-pixel-based position, see
PhysicalPosition
.Since
2.0.0