ImmutableStrokeInputBatch


class ImmutableStrokeInputBatch : StrokeInputBatch


An immutable implementation of StrokeInputBatch. For a mutable alternative, see MutableStrokeInputBatch.

Summary

Public companion properties

ImmutableStrokeInputBatch

An empty ImmutableStrokeInputBatch.

Public functions

open String

Inherited functions

From androidx.ink.strokes.StrokeInputBatch
Unit
operator StrokeInput
get(index: Int)

Gets the value of the i-th input.

Long

The duration between the first and last input in milliseconds.

Float

The physical distance in centimeters that the pointer must travel in order to produce an input motion of one stroke unit.

InputToolType

How this input stream should be interpreted, as coming from a InputToolType.MOUSE, InputToolType.TOUCH, or InputToolType.STYLUS.

Boolean

Whether all of the individual inputs have a defined value for StrokeInput.orientationRadians.

Boolean

Whether all of the individual inputs have a defined value for StrokeInput.pressure.

Boolean

Whether strokeUnitLengthCm has a valid value, which is something other than StrokeInput.NO_STROKE_UNIT_LENGTH.

Boolean

Whether all of the individual inputs have a defined value for StrokeInput.tiltRadians.

Boolean

true if there are no StrokeInput objects in the batch, and false otherwise.

StrokeInput
populate(index: Int, outStrokeInput: StrokeInput)

Gets the value of the i-th input and overwrites outStrokeInput, which it then returns.

Inherited properties

From androidx.ink.strokes.StrokeInputBatch
Int

Number of StrokeInput objects in the batch.

Public companion properties

Public functions

toString

open fun toString(): String