dpi
Classes
LogicalPosition
A position represented in logical pixels.
Since
2.0.0
Constructors
new LogicalPosition()
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L62
Properties
Property | Type | Default value |
---|---|---|
type | string | 'Logical' |
x | number | undefined |
y | number | undefined |
LogicalSize
A size represented in logical pixels.
Since
2.0.0
Constructors
new LogicalSize()
Parameters
Parameter | Type |
---|---|
width | number |
height | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L15
Properties
Property | Type | Default value |
---|---|---|
height | number | undefined |
type | string | 'Logical' |
width | number | undefined |
PhysicalPosition
A position represented in physical pixels.
Since
2.0.0
Constructors
new PhysicalPosition()
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L78
Properties
Property | Type | Default value |
---|---|---|
type | string | 'Physical' |
x | number | undefined |
y | number | undefined |
Methods
toLogical()
Converts the physical position to a logical one.
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Example
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L94
PhysicalSize
A size represented in physical pixels.
Since
2.0.0
Constructors
new PhysicalSize()
Parameters
Parameter | Type |
---|---|
width | number |
height | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L31
Properties
Property | Type | Default value |
---|---|---|
height | number | undefined |
type | string | 'Physical' |
width | number | undefined |
Methods
toLogical()
Converts the physical size to a logical one.
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Example
Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/dpi.ts#L47
© 2024 Tauri Contributors. CC-BY / MIT