Tauri PhysicalSize
A以物理像素表示的大小。
Since: 1.0.0
构造函数
constructor
new PhysicalSize(: , : ):PhysicalSize
width
number
height
number
参数
名字 | 类型 |
---|---|
width | number |
height | number |
Defined in: window.ts:133
性能
height
height: number
Defined in: window.ts:131
type
type: string = 'Physical'
Defined in: window.ts:129
width
width: number
Defined in: window.ts:130
方法
toLogical
toLogical(: ):LogicalSize
scaleFactor
number
将物理大小转换为逻辑大小。
例
import { appWindow } from '@tauri-apps/api/window';
const factor = await appWindow.scaleFactor();
const size = await appWindow.innerSize();
const logical = size.toLogical(factor);
参数
名字 | 类型 |
---|---|
scaleFactor | number |
Returns: LogicalSize