detectTransformGestures

suspend fun PointerInputScope.detectTransformGestures(onGesture: (change: PointerInputChange, isMultiTouch: Boolean) -> Unit, onGestureStart: (Offset) -> Unit = {}, onGestureEnd: (isMultiTouch: Boolean) -> Unit = {}, onGestureCancel: () -> Unit = {})

Detects transform gestures such as zoom and pan, with support for multi-touch gestures. This function handles gesture start, ongoing changes (zoom and pan), and gesture end.

Parameters

onGesture

A lambda function that is called on every gesture update. It provides: - change: The pointer input change. - isMultiTouch: Boolean indicating whether the gesture involves multiple touches.

onGestureStart

A lambda function called when the gesture starts, providing the initial position.

onGestureEnd

A lambda function called when the gesture ends, indicating whether it was multi-touch.

onGestureCancel

A lambda function called when the gesture is cancelled.


suspend fun PointerInputScope.detectTransformGestures(onGesture: (zoomChange: Float, panChange: Offset, change: PointerInputChange, isMultiTouch: Boolean) -> Unit, onGestureStart: (Offset) -> Unit = {}, onGestureEnd: (isMultiTouch: Boolean) -> Unit = {}, onGestureCancel: () -> Unit = {})

Detects transform gestures such as zoom and pan, with support for multi-touch gestures. This function handles gesture start, ongoing changes (zoom and pan), and gesture end.

Parameters

onGesture

A lambda function that is called on every gesture update. It provides: - zoomChange: The change in zoom scale. - panChange: The offset change for panning. - change: The pointer input change. - isMultiTouch: Boolean indicating whether the gesture involves multiple touches.

onGestureStart

A lambda function called when the gesture starts, providing the initial position.

onGestureEnd

A lambda function called when the gesture ends, indicating whether it was multi-touch.

onGestureCancel

A lambda function called when the gesture is cancelled.