Hey! I'm trying made smt like paint using the canvas-view. How can I draw a circle which is expanding, while user move finger on a screen, without save Image into storage? Also, I wanna show radius (line from center to current x,y)
Already tried to use 2 variables, one for screen state before drawing circles and second - for state with circle.
Alghoritms be like:
- in onTouchDown() / or in onTouchUp(), nvm: savedScreen = canvas.Save()
- in onDragged()
canvas.Background = savedScreen
drawCircle(startX,startY,r)
bufferedScreen = canvas.Save()
drawLine(startX,startY,currX,currY)
Save screen into buffer before drawLine , becouse I dont need it, just line, which represents redius.
How can I made it , without save() method if set canvas.background = get canvas.background gaves me emoty screen , becouse it cant find file with name ${get canvas.background}?