-
Notifications
You must be signed in to change notification settings - Fork 133
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
Incorrect sweep-flag in circle/ellipse equivalent path #765
Comments
Minimal example: the current SVG 2 draft says that the equivalent path for:
should be:
(ignoring the segment-completing close path operation to make it a valid path data string) See below how Chrome renders this path (left), compared to how Chrome renders the path if we change sweep-flag to 1 (right).
|
You can draw a circle in different ways using paths, so that's a bit tricky.
draws a circle, with a sweep-flag set to 0. |
@caribouW3 I think you overlooked some parts of the spec prose: the coordinates of the equivalent arc commands of a In other words, the following example (that I provided earlier):
is exactly what the current spec mandates as equivalent path for The current spec prose is very specific (but wrong) and currently mandates that the equivalent path for a
Where:
So with this circle:
And the above is not a circle but the star shape on the top of this comment. I have exhaustively implemented these equivalent paths in my SVG renderer and I am very confident that the current prose is incorrect, and that the |
The equivalent path of a circle (similar for ellipses) is currently defined as:
https://svgwg.org/svg2-draft/shapes.html#CircleElement
I think this is incorrect, that is, the sweep-flag should be 1, not 0, like it is for rounded rects for example (both are traced clockwise).
With the current equivalent paths, I get this for some of the examples in the spec, showing that:
The text was updated successfully, but these errors were encountered: