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

eraser and recover brush for fabricjs( canvas) #5187

Closed
komagic opened this issue Aug 22, 2018 · 17 comments
Closed

eraser and recover brush for fabricjs( canvas) #5187

komagic opened this issue Aug 22, 2018 · 17 comments

Comments

@komagic
Copy link

komagic commented Aug 22, 2018

haha,i am try to create a simple editor by fabricjs, i created an eraser and a recovery brush, as show below:
2018-08-22 10 09 23

however, i do not know how to create a path with feather edges by fabricjs,can you show me some samples?

@asturur
Copy link
Member

asturur commented Aug 22, 2018

Hi @komagic, i do not understand your question.

Can you rephrase it, please?

@komagic
Copy link
Author

komagic commented Aug 22, 2018

how to create a path with alpha feather edges( fabricjs)?
2018-08-22 3 30 59

@asturur
Copy link
Member

asturur commented Aug 22, 2018

There is no such a tool.
If you can define a path for your shape you can overlay a series of strokes with different opacity to imitate the effect.

@komagic
Copy link
Author

komagic commented Aug 22, 2018

how to copy the content of the canvas to another canvas correctly? use todataURL pls. (do not use toJson)

@asturur
Copy link
Member

asturur commented Aug 22, 2018

you can use drawImage to draw your current lowerCanvasEl somewhere else.

@asturur asturur closed this as completed Aug 22, 2018
@asturur
Copy link
Member

asturur commented Aug 22, 2018

i can t really follow step by step your project. You should make a good open stack overflow snippet and ask help on stackoverflow. Here we can t provide this kind of help

@Euphoria9702
Copy link

我最近也在想用fabric.js您当时实现的内容,demo可以放到git上给我参考学习一下吗,哈哈

@Euphoria9702
Copy link

@ @komagic

@ShaMan123
Copy link
Contributor

@asturur can shadow be used here?

@ShaMan123
Copy link
Contributor

haha,i am try to create a simple editor by fabricjs, i created an eraser and a recovery brush, as show below:
2018-08-22 10 09 23

however, i do not know how to create a path with feather edges by fabricjs,can you show me some samples?

This is a cool feature

@ShaMan123
Copy link
Contributor

Tried it out, looks interesting:
https://codesandbox.io/s/exciting-architecture-bcgej?file=/src/App.tsx

hit the erase button

@Euphoria9702
Copy link

how to created recovery brush @komagic

@ShaMan123
Copy link
Contributor

ShaMan123 commented Aug 4, 2021

see PR #7271

@Euphoria9702
Copy link

It will draw color and I would expect it won't and only recover erased paths.

@ShaMan123
Copy link
Contributor

Indeed, as I stated in the PR

@ShaMan123
Copy link
Contributor

solved

@ShaMan123
Copy link
Contributor

The eraser has moved https://github.com/ShaMan123/erase2d

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

4 participants