- From: Boris Dalstein via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 May 2024 10:27:23 +0000
- To: public-svg-issues@w3.org
@caribouW3 I think you overlooked some parts of the spec prose: the coordinates of the equivalent arc commands of a `<circle>` are mandated by the spec, so you cannot change them like you have done in your example. In other words, the following example (that I provided earlier): ``` <path transform="translate(150,150)" d=" M 100 0 A 100 100 0 0 0 0 100 A 100 100 0 0 0 -100 0 A 100 100 0 0 0 0 -100 A 100 100 0 0 0 100 0 Z" /> ``` ![image](https://github.com/w3c/svgwg/assets/4809739/936309af-d9be-4d73-a3c4-7494e1151159) is exactly what the current spec mandates as equivalent path for `<circle cx="0" cy="0" r="100" />` (no room for interpretation), while the example that you provide does not. The current spec prose is very specific (but wrong) and currently mandates that the equivalent path for a `<circle>` element is the following: - A move-to command to the point cx+r,cy; - arc to cx,cy+r; - arc to cx-r,cy; - arc to cx,cy-r; - arc with a segment-completing close path operation. Where: - `cx`, `cy`, and `r` refer to the parameters of the `<circle>` element - All arc flags are set to zero - The `rx` and `ry` parameters of the arc commands are equal to the `r` parameter of the `<circle>` element So with this circle: `<circle cx="0" cy="0" r="100" />`, we have: - Move to cx+r, cy = 0+100, 0 - Arc to cx,cy+r = 0, 0+100 - Arc to cx-r,cy = 0-100, 0 - Arc to cx,cy-r = 0, 0-100 - Segment-completing arc: 0+100, 0 (same coordinate as the move to command) 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 `sweep-flag` should be mandated to be set to one, as corrected by https://github.com/w3c/svgwg/pull/878. -- GitHub Notification of comment by dalboris Please view or discuss this issue at https://github.com/w3c/svgwg/issues/765#issuecomment-2102394579 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 9 May 2024 10:27:23 UTC