dpi
Ce contenu n’est pas encore disponible dans votre langue.
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/packages/api/src/dpi.ts#L208
new LogicalPosition()
Parameters
Parameter | Type |
---|---|
object | object |
object.Logical | object |
object.Logical.x | number |
object.Logical.y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L209
new LogicalPosition()
Parameters
Parameter | Type |
---|---|
object | object |
object.x | number |
object.y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L210
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
type | readonly | "Logical" | 'Logical' | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L204 |
x | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L205 |
y | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L206 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Name | Type | Defined in |
---|---|---|
x | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L252 |
y | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L253 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L250
toJSON()
Returns
object
Name | Type | Defined in |
---|---|---|
x | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L252 |
y | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L253 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L257
toPhysical()
Converts the logical position to a physical one.
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Example
Since
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L246
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/packages/api/src/dpi.ts#L17
new LogicalSize()
Parameters
Parameter | Type |
---|---|
object | object |
object.Logical | object |
object.Logical.height | number |
object.Logical.width | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L18
new LogicalSize()
Parameters
Parameter | Type |
---|---|
object | object |
object.height | number |
object.width | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L19
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
height | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L15 |
type | readonly | "Logical" | 'Logical' | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L13 |
width | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L14 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Name | Type | Defined in |
---|---|---|
height | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L62 |
width | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L61 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L59
toJSON()
Returns
object
Name | Type | Defined in |
---|---|---|
height | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L62 |
width | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L61 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L66
toPhysical()
Converts the logical size to a physical one.
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Example
Since
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L55
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/packages/api/src/dpi.ts#L273
new PhysicalPosition()
Parameters
Parameter | Type |
---|---|
object | object |
object.Physical | object |
object.Physical.x | number |
object.Physical.y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L274
new PhysicalPosition()
Parameters
Parameter | Type |
---|---|
object | object |
object.x | number |
object.y | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L275
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
type | readonly | "Physical" | 'Physical' | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L269 |
x | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L270 |
y | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L271 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Name | Type | Defined in |
---|---|---|
x | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L317 |
y | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L318 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L315
toJSON()
Returns
object
Name | Type | Defined in |
---|---|---|
x | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L317 |
y | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L318 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L322
toLogical()
Converts the physical position to a logical one.
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Example
Since
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L311
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/packages/api/src/dpi.ts#L82
new PhysicalSize()
Parameters
Parameter | Type |
---|---|
object | object |
object.Physical | object |
object.Physical.height | number |
object.Physical.width | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L83
new PhysicalSize()
Parameters
Parameter | Type |
---|---|
object | object |
object.height | number |
object.width | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L84
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
height | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L80 |
type | readonly | "Physical" | 'Physical' | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L78 |
width | public | number | undefined | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L79 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Name | Type | Defined in |
---|---|---|
height | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L123 |
width | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L122 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L120
toJSON()
Returns
object
Name | Type | Defined in |
---|---|---|
height | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L123 |
width | number | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L122 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L127
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/packages/api/src/dpi.ts#L116
Position
A position represented either in physical or in logical pixels.
This type is basically a union type of LogicalSize
and PhysicalSize
but comes in handy when using tauri::Position
in Rust as an argument to a command, as this class
automatically serializes into a valid format so it can be deserialized correctly into tauri::Position
So instead of
You can just use Position
Since
2.1.0
Constructors
new Position()
Parameters
Parameter | Type |
---|---|
position | LogicalPosition | PhysicalPosition |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L362
Properties
Property | Type | Defined in |
---|---|---|
position | LogicalPosition | PhysicalPosition | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L360 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L378
toJSON()
Returns
object
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L387
toLogical()
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L366
toPhysical()
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L372
Size
A size represented either in physical or in logical pixels.
This type is basically a union type of LogicalSize
and PhysicalSize
but comes in handy when using tauri::Size
in Rust as an argument to a command, as this class
automatically serializes into a valid format so it can be deserialized correctly into tauri::Size
So instead of
You can just use Size
Since
2.1.0
Constructors
new Size()
Parameters
Parameter | Type |
---|---|
size | LogicalSize | PhysicalSize |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L167
Properties
Property | Type | Defined in |
---|---|---|
size | LogicalSize | PhysicalSize | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L165 |
Methods
__TAURI_TO_IPC_KEY__()
Returns
object
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L183
toJSON()
Returns
object
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L192
toLogical()
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L171
toPhysical()
Parameters
Parameter | Type |
---|---|
scaleFactor | number |
Returns
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/dpi.ts#L177
© 2024 Tauri Contributors. CC-BY / MIT