-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Shadow Color Support in SVG #2098
Comments
I tried lot of tecnics to get shadow colors, when i adjust shadow intensity. Please consider problem with overlapping shapes, i do not really remind where did i hit the wall. Can you post a full sgv shadow with color other than a fragment? |
Of cause, here it is :
|
It supposed to be an image in it, and I removed it, but leaved clip path, it's a group, with one rectangle, one triangle, and one image, and the image only displayed in part of with clip path, I changed fabricjs to add clipPath too, anyway. |
I ll try as soon as new version is out. |
No problem, I am looking forward the progress 👍 |
the reason why clippath support is not added in fabricjs yet is beacuse i could not correctly clip with:
if you mind to share what you did i'll take every avantage from it. |
We used clipTo to clip image object in a group, and I only added clip-path attribute of SVG element style to image, so I can get part of image object, because clipTo support clip an object with rectangle, so it's easy to add this to image.class.js, you can see clip-path element is,
Until now I only used this one. But clipTo do support different type of clip, so you might need to check Another problem is here x, y, width, height, they are not belong to fabricjs object attributes, we added custom extra attributes to the object to revolve that, in fabricjs, might be another new attribute (similar to gradient or shadow realization), but you will have better solution, I believe. |
Currently fabricjs didn't support shadow color in SVG, I recommended that you can check this example:
The text was updated successfully, but these errors were encountered: