Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ninonur opened this issue May 29, 2018 · 2 comments
Open

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

ninonur opened this issue May 29, 2018 · 2 comments

Comments

@ninonur
Copy link

ninonur commented May 29, 2018

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
Copy link

rulfox commented Oct 8, 2018

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants