HistoricalChange


Data structure for "historical" pointer moves.

Optional high-frequency pointer moves in between the last two dispatched events: can be used for extra accuracy when input rate exceeds framerate.

Summary

Public constructors

HistoricalChange(
    uptimeMillis: Long,
    position: Offset,
    scaleGestureFactor: Float,
    panGestureOffset: Offset
)
Cmn

Public functions

open String
Cmn

Public properties

Offset

An Offset in pixel coordinates indicating an amount of scrolling.

Cmn
Offset

The Offset of the historical pointer event, relative to the containing element.

Cmn
Float

A multiplicative scale factor indicating the amount of scale to perform as part of this pointer input change.

Cmn
Long

The time of the historical pointer event, in milliseconds.

Cmn

Public constructors

HistoricalChange

HistoricalChange(
    uptimeMillis: Long,
    position: Offset,
    scaleGestureFactor: Float = 1.0f,
    panGestureOffset: Offset = Offset.Zero
)
Parameters
uptimeMillis: Long

The time of the historical pointer event, in milliseconds. In between the current and previous pointer event times.

position: Offset

The Offset of the historical pointer event, relative to the containing element.

scaleGestureFactor: Float = 1.0f

A multiplicative scale factor indicating the amount of scale to perform as part of this pointer input change. A value of 1f indicates no scale, a value less than 1f indicates a scale down, commonly causing a zoom out, and a value greater than 1f indicates a scale up, commonly causing a zoom in.

panGestureOffset: Offset = Offset.Zero

An Offset in pixel coordinates indicating an amount of scrolling.

Public functions

toString

open fun toString(): String

Public properties

panGestureOffset

val panGestureOffsetOffset

An Offset in pixel coordinates indicating an amount of scrolling.

position

val positionOffset

The Offset of the historical pointer event, relative to the containing element.

scaleGestureFactor

val scaleGestureFactorFloat

A multiplicative scale factor indicating the amount of scale to perform as part of this pointer input change. A value of 1f indicates no scale, a value less than 1f indicates a scale down, commonly causing a zoom out, and a value greater than 1f indicates a scale up, commonly causing a zoom in.

uptimeMillis

val uptimeMillisLong

The time of the historical pointer event, in milliseconds. In between the current and previous pointer event times.