-
Notifications
You must be signed in to change notification settings - Fork 117
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
base: master
Are you sure you want to change the base?
Conversation
Thanks (again) for the pull request! |
I'm having a problem on KitKat and below, the eraser seems to be painting black instead of actually canceling the previous paint |
But when I take the "screenshot" of the draw, the erased content is rendered correctly even on KitKat- |
Also, if you add just a dot, it's rendered with the paint, instead of erasing |
I was having a similar problem (painting in black) until I added the
"setLayer" command which solved it for API 21 and above.
I'll try to do some more testing on KitKat and see what I can find.
This is turning out to be harder than I thought.
There is another approach - specify a background color and then paint in
the background color for erase.
This might be more robust than the Xfer mode approach.
I'll try again.
Thanks
Jim
…On Tue, Apr 18, 2017 at 4:54 AM, Riccardo Moro ***@***.***> wrote:
Also, if you add just a dot, it's rendered with the paint, instead of
erasing
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUn0u9uqFX_O6wfVOSIaSHfjqmwZQrtks5rxIhlgaJpZM4M8dgp>
.
|
If we add a background for the image, the above trick won't work.. |
@rajajawahar correct.. |
Is there a way we can remove the HistoryPath when user in EraserMode.. |
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.