- From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
- Date: Mon, 18 Nov 2019 15:40:50 +0000
- To: public-svg-issues@w3.org
AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "Paths chapter": == Third parameter of arc in path data should allow signed numbers == Hi everyone, As I'm currently writing a parser for SVG path data, I'm able to provide a new pair of eyes for the new grammar definition introduced in SVG 2. Disclaimer: I'm not a grammar specialist, but I did study those things at University a few years back, so hopefully I'm not too rusty. I am now reasonably familiar with the original SVG 1.1 grammar: https://www.w3.org/TR/SVG11/paths.html#PathDataBNF The one currently drafted in: https://svgwg.org/svg2-draft/paths.html#PathDataBNF And I have read the following threads to get a sense of the history and rationale of some of the modifications: https://github.com/w3c/svgwg/issues/335 https://github.com/w3c/svgwg/issues/331 https://github.com/w3c/svgwg/issues/286 https://github.com/w3c/svgwg/issues/325 Overall, I think the SVG 2 draft grammar reads much better than the SVG 1.1 grammar, thank you for that! I may suggest minor tweaks later to improve readability, but for now a more serious issue. I think the following: ``` elliptical_arc_argument::= number comma_wsp? number comma_wsp? number comma_wsp flag comma_wsp? flag comma_wsp? coordinate_pair ``` should be: ``` elliptical_arc_argument::= number comma_wsp? number comma_wsp? coordinate comma_wsp flag comma_wsp? flag comma_wsp? coordinate_pair ``` In other words, the third parameter of an arc should be `coordinate` rather than `number` (it can be negative). The original SVG 1.1 grammar was the following: ``` elliptical-arc-argument: nonnegative-number comma-wsp? nonnegative-number comma-wsp? number comma-wsp flag comma-wsp? flag comma-wsp? coordinate-pair ``` This seems an unintentional mistake, as I haven't seen this discussed, but maybe I missed it. Cheers, Boris See https://github.com/w3c/svgwg/issues/750
Received on Monday, 18 November 2019 15:40:52 UTC