pinch
Function
Common
Deprecated Replaced by TouchInjectionScope. Use
performTouchInput
instead ofperformGesture
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 Offset
s, 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 |
Common
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 Offset
s, 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 |