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