pinch

Function

Common

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

start0The start position of the first gesture in the node's local coordinate system
end0The end position of the first gesture in the node's local coordinate system
start1The start position of the second gesture in the node's local coordinate system
end1The end position of the second gesture in the node's local coordinate system
durationMillisthe 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 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

start0The start position of the first gesture in the node's local coordinate system
end0The end position of the first gesture in the node's local coordinate system
start1The start position of the second gesture in the node's local coordinate system
end1The end position of the second gesture in the node's local coordinate system
durationMillisthe duration of the gesture