Korilakkuma / CanvasView

Android Application Library
Other
183 stars 72 forks source link

canvas.clear will turn base color to white. #27

Open ninonur opened 6 years ago

ninonur commented 6 years ago

I have put canvas.setBaseColor(Color.TRANSPARENT); because I have an imageview below canvas, for my simple photo/image doodle editor. But whenever I call canvas.clear(), the whole screens goes white. And if I using eraser on canvas the below image/photo appears. I figure out that the base color has change to white because of something inside clear void.

So I try removing or replacing paint.setColor(Color.WHITE) to paint.setColor(baseColor) inside clear() void. Testing the base color to regular color(red,blue,etc) will work. But if I put Color.TRANSPARENT will make it clear NOTHING at all.

rulfox commented 6 years ago

i have tried clear() and it turns screen to white. So what im doing is while(canvas.canUndo){canvas.undo();}. When a bitma is drawn, it can't be reverted using undo();

MahmoudHooda2019 commented 2 years ago

i have tried clear() and it turns screen to white. So what im doing is while(canvas.canUndo){canvas.undo();}. When a bitma is drawn, it can't be reverted using undo();

Thank you very much