Google is committed to advancing racial equity for Black communities. See how.

PointerEvent

data actual class PointerEvent
kotlin.Any
   ↳ androidx.compose.ui.input.pointer.PointerEvent

Describes a pointer input change event that has occurred at a particular point in time.

Summary

Public constructors
<init>(changes: List<PointerInputChange>)

Extension functions
From androidx.compose.foundation.gestures
Offset
PointerEvent.calculateCentroid(useCurrent: Boolean = true)

Returns the centroid of all pointers that are down and were previously down.

Float

Returns the average distance from the centroid for all pointers that are currently and were previously down.

Offset

Returns the change in the centroid location between the previous and the current pointers that are down.

Float

Returns the rotation, in degrees, of the pointers between the PointerInputChange.previous and PointerInputChange.current states.

Float

Uses the change of the centroid size between the PointerInputChange.previous and PointerInputChange.current to determine how much zoom was intended.

Properties
actual List<PointerInputChange>

The changes.

Public constructors

<init>

PointerEvent(changes: List<PointerInputChange>)
Parameters
changes: List<PointerInputChange> The changes.

Properties

changes

actual val changes: List<PointerInputChange>

The changes.