Sketchbook

@Composable
fun Sketchbook(modifier: Modifier, controller: SketchbookController, backgroundColor: Color = Color.Transparent, imageBitmap: ImageBitmap? = null, onEventListener: (x: Float, y: Float) -> Unit? = null, onRevisedListener: (canUndo: Boolean, canRedo: Boolean) -> Unit? = null)

Sketchbook is a canvas implementation to draw paths with custom properties.

SketchbookController allows you to control the Sketchbook.

Parameters

modifier

Modifier to decorate the canvas.

controller
backgroundColor

A background color to be used erasing colored paths.

imageBitmap

An ImageBitmap to draw on the canvas as a background.

onEventListener

An event listener to track drawing paths.

onRevisedListener

A listener to track whether can execute undo or redo.