-
Notifications
You must be signed in to change notification settings - Fork 132
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
Define path interpolation when relative and absolute segment types are used. #947
Comments
Hmmm, both the SVG 1.1 recommendation and the 2.0 draft define for relative and absolute only two letters for the same command to destinguish between relative and absolute. But I agree, that it is better to note this explicitely to avoid confusion between different implementations. |
Sure, but the point is that there are two ways to represent the same point, so you can interpolate the same points and give two different answers which are both correct, right? So it's not so much about confusion but undefinedness in the spec... |
It is a simple addition of coordinates as operation, affine, therefore no problem, same result. Just to have some pastime, I created a simple example using two paths with M,C and m,c and the same graphical result - interpolates in the same way. This would be different, if one tries to interpolate between absolute and relative coordinates, all points just need the same coordinate system (origin) to get it right. |
Same result, but since the difference is observable via DOM APIs it should be defined to avoid gratuitous behaviour differences between browsers. |
https://svgwg.org/svg2-draft/paths.html says how to interpolate paths:
However browsers support interpolating relative with non-relative paths, and currently behavior diverges across browsers...
https://wpt.fyi/results/svg/animations/animate-path-animation-Mm-Aa-Z.tentative.html?label=experimental&label=master&aligned
What is the correct behavior? Should paths always be normalized (absolutized) before interpolation? Or should paths try to preserve relativeness, and if so what's the right way to deal with mismatches?
The text was updated successfully, but these errors were encountered: