-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
feat: support background fill for freedraw shapes #4610
Conversation
This pull request is being automatically deployed with Vercel (learn more). excalidraw-package-example – ./src/packages/excalidraw🔍 Inspect: https://vercel.com/excalidraw/excalidraw-package-example/J7pSJ5GhRHgqt1BjoDPW1NGNpj4e excalidraw – ./🔍 Inspect: https://vercel.com/excalidraw/excalidraw/6t1jYjuUB1wFdoDBGnaZA31LmC5j |
Just noticed that the fill style is not working. Looking into it. |
Very cool @h7y!
You'd need to use rough-js renderer for this. Also, let's make sure that filled freedraw shapes are selectable from inside. Don't recall where in the checks you need to enable this. |
This looks cool. |
Strangely, the hitbox doesn't work when the fill is |
Found out why this is happening. It's because when the fill style is solid most of the curve path ops of the filled shape have op value as "lineTo" which is not yet handled in the excalidraw/src/element/collision.ts Lines 899 to 900 in 24bf4cb
I came up with something that somewhat works which I'll push shortly. Trying to understand how this all works to come up with a proper solution. |
Ad the collision check — I've reused |
Thanks for the PR (and sorry for the delay!) ❤️ |
Thanks for taking it up and making the changes! :) ♥ |
fix #4592
chrome_LR9SV7RT36.mp4