FreeDrawView icon indicating copy to clipboard operation
FreeDrawView copied to clipboard

Support eraser?

Open KingWu opened this issue 8 years ago • 8 comments

Hi, it is nice job. but wanna to know whether support eraser? If not, i feel free to implement it.

KingWu avatar Jan 27 '17 04:01 KingWu

Thank you! Right now erase-mode it's not supported. Feel free to contribute :)

RiccardoMoro avatar Jan 28 '17 23:01 RiccardoMoro

Would be interested too, seems like a very useful feature :) Is it possible to easily add it with your implementation?

csbenz avatar Feb 02 '17 07:02 csbenz

In fact it's very simple to implement: set the stroke color to the background color. @KingWu do you have time to make a PR?

csbenz avatar Feb 02 '17 08:02 csbenz

Thank you all for the interest in my library! Yes, it's easiest way, but that may cause future problems if I'll add the option to set a background image (as I'm planning to do in the next release)

RiccardoMoro avatar Feb 02 '17 09:02 RiccardoMoro

Sounds very interesting, any idea how you would do that? Because the only way I can think of is to draw all the paths on a bitmap and use the PorterDuff.Mode.CLEAR mode to erase...

Right now, you're not drawing the paths on a bitmap but directly on the view.

kojokey avatar Feb 04 '17 14:02 kojokey

@kojokey Yes, that's the only way I can think of too.. But that means a lot of rework and changes in the code I guess. I'll take a look if I find something else

RiccardoMoro avatar Feb 06 '17 16:02 RiccardoMoro

Hi. I would really need this feature as well. Maybe this can help: https://stackoverflow.com/questions/17197435/trying-to-create-an-eraser-paint-for-canvas

I like your library because it's simple, effective, powerful and lightweight.

famecastle avatar Sep 23 '17 11:09 famecastle

Please implement "Eraser" that is very necessary for this library.

sudarshaana avatar Aug 08 '19 07:08 sudarshaana