useLaserPointerMode

fun Modifier.useLaserPointerMode(controller: LaserPointerController, progress: State<Float>, isEnabled: Boolean, onCanvasInvalidate: () -> Unit = { }): Modifier

A modifier that enables laser pointer mode on a canvas, allowing for touch gestures such as starting, moving, and ending a touch event with updates to the laser pointer’s appearance.

Return

The modifier applied to the canvas that handles the laser pointer gestures and drawing.

Parameters

controller

The controller responsible for handling laser pointer actions.

progress

A state that controls the progress (e.g., alpha transparency) of the laser pointer.

isEnabled

A flag indicating whether the laser pointer mode is enabled.

onCanvasInvalidate

A callback function invoked when the canvas needs to be invalidated.