CanvasView icon indicating copy to clipboard operation
CanvasView copied to clipboard

canvas.clear will turn base color to white.

Open ninonur opened this issue 6 years ago • 2 comments

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.

ninonur avatar May 29 '18 13:05 ninonur

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();

rulfox avatar Oct 08 '18 06:10 rulfox

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

MahmoudHooda2019 avatar Aug 04 '22 00:08 MahmoudHooda2019