A position represented in physical pixels.
For an explanation of what physical pixels are, see description of PhysicalSize.
PhysicalSize
2.0.0
Readonly
Converts the physical position to a logical one.
import { PhysicalPosition } from '@tauri-apps/api/dpi';import { getCurrentWindow } from '@tauri-apps/api/window';const appWindow = getCurrentWindow();const factor = await appWindow.scaleFactor();const position = new PhysicalPosition(400, 500);const physical = position.toLogical(factor); Copy
import { PhysicalPosition } from '@tauri-apps/api/dpi';import { getCurrentWindow } from '@tauri-apps/api/window';const appWindow = getCurrentWindow();const factor = await appWindow.scaleFactor();const position = new PhysicalPosition(400, 500);const physical = position.toLogical(factor);
A position represented in physical pixels.
For an explanation of what physical pixels are, see description of
PhysicalSize
.Since
2.0.0