🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

pinch

Performs a pinch gesture on the associated node.

pinch

Source set: Common
@Deprecated(
    message = "Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`"
)
public fun GestureScope.pinch(
    start0: Offset,
    end0: Offset,
    start1: Offset,
    end1: Offset,
    durationMillis: Long = 400,
): Unit

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

Source set: Common
public 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

Source set: Common
public 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