I am developing a drawing app with Jetpack Compose Canvas, I am able to draw on the canvas and undo/redo my hand-drawn strokes. I also need options to change the brush color and size. Finally, I want to save the image as both PNG and JPG.
I would be grateful for any code snippet, suggestions, references, or links.
change the brush color and size
You can create a Paint with stroke color and size like:
then draw your path with this Paint:
save the image as both PNG and JPG
You can achieve it by :