pinch
fun IndirectPointerInjectionScope.pinch(
start0: Offset,
end0: Offset,
start1: Offset,
end1: Offset,
durationMillis: Long = 400,
)
Performs a pinch gesture on nodes in the focus path.
For each pair of start and end Offsets, the motion events are linearly interpolated.
The coordinates are NOT in the node's local coordinate system (see IndirectPointerInjectionScope.inputDeviceSize).
The default duration is 400 milliseconds.
Parameters
| start0 | The start position of the first pointer in the indirect pointer input device's coordinate system (IndirectPointerInjectionScope.inputDeviceSize). |
| end0 | The end position of the first pointer in the indirect pointer input device's coordinate system (IndirectPointerInjectionScope.inputDeviceSize). |
| start1 | The start position of the second pointer in the indirect pointer input device's coordinate system. |
| end1 | The end position of the second pointer in the indirect pointer input device's coordinate system (IndirectPointerInjectionScope.inputDeviceSize). |
| durationMillis | the duration of the pinch gesture |
pinch
Deprecated
Replaced by TouchInjectionScope. Use performTouchInput instead of performGesture
fun GestureScope.pinch(
start0: Offset,
end0: Offset,
start1: Offset,
end1: Offset,
durationMillis: Long = 400,
) = delegateScope.touch { pinch(start0, end0, start1, end1, durationMillis) }
Performs a pinch gesture on the associated node.
For each pair of start and end Offsets, the motion events are linearly interpolated. The coordinates are in the node's local coordinate system where (0, 0) is the top left corner of the node. The default duration is 400 milliseconds.
Parameters
| start0 | The start position of the first gesture in the node's local coordinate system |
| end0 | The end position of the first gesture in the node's local coordinate system |
| start1 | The start position of the second gesture in the node's local coordinate system |
| end1 | The end position of the second gesture in the node's local coordinate system |
| durationMillis | the duration of the gesture |
pinch
fun TouchInjectionScope.pinch(
start0: Offset,
end0: Offset,
start1: Offset,
end1: Offset,
durationMillis: Long = 400,
)
Performs a pinch gesture on the associated node.
For each pair of start and end Offsets, the motion events are linearly interpolated. The coordinates are in the node's local coordinate system where (0, 0) is the top left corner of the node. The default duration is 400 milliseconds.
Parameters
| start0 | The start position of the first gesture in the node's local coordinate system |
| end0 | The end position of the first gesture in the node's local coordinate system |
| start1 | The start position of the second gesture in the node's local coordinate system |
| end1 | The end position of the second gesture in the node's local coordinate system |
| durationMillis | the duration of the gesture |