-
-
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
Handling Shadow of flipped objects #2799
Comments
Do you think is worth mentioning that your text is flipped? |
Sorry, I guess flipped would be the correct word. That's why I included the SVG so you could see the error very easily. |
And now the question... should i flip the shadow on canvas or on the SVG? Let's talk cleary. Shadow should not scale with object, but we did it because it feels more in line with the scaling effect opposite the resize effect. So let's try a new git hub feature, express your emotion on following posts |
I will flip the shadow on the canvas when the object flip (THIS IS B) |
i will fix the SVG export to do not flip shadow with object, shadow will not flip ( THIS IS A ) |
Twitterverse suggested to not flip since changing source of light feels wrong https://twitter.com/kangax/status/708383962834595840 |
Completely true, but also scaling shadow is wrong and also borders dropping shadows over the mainshape feels wrong. Just because flipping is a negative scaling i made this question. |
Scaling shadow can be explained by raising the distance of the object to the surface. Although that's definitely not the case here, it still could be. I would say the shadows are based on 0-* light source(s) defined by the user/programmer. Give them an x, y and z value and you're good to go. |
ok for fixing svg export then. |
Hey Guys, As someone who is not quite a fabric.js dev, (yet), I would only say the objective of my fun little project is to have a perfect SVG export in every way possible. I am less interested in how it's done, just that what I see on fabric's canvas, I want to look the same in a SVG viewer/browser. So, my 2-cents are, just change the SVG export so things line up wherever possible. This would apply to some of the other issues I have brought up before now to, like with strokes and such. It's not really so much an issue with fabric, as it is, trying to make the SVG export look the same. |
yes fix svg export is the purpouse of this topic. |
I know, that's why I injected my opinion that fixing the SVG is probably better :) |
Hi, I just wanted to report that this exact same issue as Shadow in SVG is displaying in wrong location when the object is rotated #2669, but with how it works with text shadows. I pasted the SVG below that fabric.js gives me. When compared to rsvg, or even the web browser rendering of the SVG, the shadow that fabric.js displays is on the wrong side of the individual characters. This problem applies to both the X and Y offsets when the text is rotated.
The text was updated successfully, but these errors were encountered: