-
- All Implemented Interfaces:
public final class SketchbookKt
-
-
Method Summary
Modifier and Type Method Description final static UnitSketchbook(Modifier modifier, SketchbookController controller, Color backgroundColor, ImageBitmap imageBitmap, Function1<Path, Unit> onPathListener, Function3<Float, Float, Integer, Unit> onEventListener, Function2<Boolean, Boolean, Unit> onRevisedListener)Sketchbook is a canvas implementation to draw paths with custom properties. -
-
Method Detail
-
Sketchbook
final static Unit Sketchbook(Modifier modifier, SketchbookController controller, Color backgroundColor, ImageBitmap imageBitmap, Function1<Path, Unit> onPathListener, Function3<Float, Float, Integer, Unit> onEventListener, Function2<Boolean, Boolean, Unit> onRevisedListener)
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- SketchbookController to control the Sketchbook.backgroundColor- A background color to be used erasing colored paths.imageBitmap- An ImageBitmap to draw on the canvas as a background.onPathListener- An event listener to track drawing paths.onEventListener- An event listener to track drawing coordinates.onRevisedListener- A listener to track whether can execute undo or redo.
-
-
-
-