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

implement eraser using PorterDuff Xfer mode #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

implement eraser using PorterDuff Xfer mode #12

wants to merge 1 commit into from

Conversation

bizzguy
Copy link
Contributor

@bizzguy bizzguy commented Apr 13, 2017

This requires a bump for minimum SDK from 9 to 11 because of the View setLayer method. This commit also has a bunch of changes to the layouts that occurred just because of reformatting.

Erases get added to undo/redo stack properly.

Also tested with screen rotation.

@RiccardoMoro
Copy link
Owner

Thanks (again) for the pull request!
I'm reviewing this in a few days, this weekend max

@RiccardoMoro
Copy link
Owner

I'm having a problem on KitKat and below, the eraser seems to be painting black instead of actually canceling the previous paint

@RiccardoMoro
Copy link
Owner

But when I take the "screenshot" of the draw, the erased content is rendered correctly even on KitKat-

@RiccardoMoro
Copy link
Owner

Also, if you add just a dot, it's rendered with the paint, instead of erasing

@bizzguy
Copy link
Contributor Author

bizzguy commented Apr 18, 2017 via email

@rajajawahar
Copy link

If we add a background for the image, the above trick won't work..

@RiccardoMoro
Copy link
Owner

@rajajawahar correct..

@rajajawahar
Copy link

Is there a way we can remove the HistoryPath when user in EraserMode..
Something like that.. I was trying to acheive it.. But it din't worked at all..
Can you help me out for eraser.. If I add Image to the view from Gallery or Camera..

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

Successfully merging this pull request may close these issues.

3 participants