CanvasView
CanvasView copied to clipboard
Fixing erase mode
Hi @Korilakkuma I have fixed the problem with the erase mode by changing the way of how createPaint method handle with erase mode. As you will see on the code of the createPaint method, I have added a new fixed configuration where I set Paint.setColor(this.paintStrokeColor). Inside the if condition, instead of call Paint.setXfermode() and Paint.setARGB(), I'm calling Paint.setColor(canvasBackgroundColor). I also moved out all the code of the else condition so, in this way, if the user doesn't pick the erase mode ,the createPaint will return a Paint object with the same color of printStrokeColor.