Re: [svgwg] SVG2 path data coordinates are currently spec'd as integers.

`flag` really does need to be separate and restricted to values 0 and 1.  Please see #324 for notes about both flags and the elliptical arc nonnegative-number thing.  

>From the [W3C tests](https://www.w3.org/Graphics/SVG/WG/wiki/Test_Suite_Overview) (old) I got the following test strings.  These should pass:
```
    //<path d="M120,120 h25 a25,25 0 10 -25,25z"     fill="lime"/>
    //<path d="M200,120 h-25 a25,25 0 1125,25 z"     fill="lime"/>
    //<path d="M120,200 h25 a25,25 0 1 1-25,-25 z"   fill="lime"/>
```
And these should fail:
```
    //<path d="M280,120 h25 a25,25 0 6 0 -25,25 z"   fill="red"/>
    //<path d="M280,200 h25 a25 25 0 1 7 -25 -25 z"  fill="red"/>
    //<path d="M360,120 h-25 a25,25 0 1 -1 25,25 z"  fill="red"/>
```
And they really do pass and fail in the major browsers.  

I know the need for the `nonnegative-number` rule goes away as the browsers do understand to use the 
absolute value of  rx/ry.

As for the comma thing, it seems to me that the SVG 1.0 specifiers were fixated on using the comma only as a meaningful separator for *numeric* operands.  Thus not a generalized separator.  (This for clarity?)  Similarly they were fixated on allowing for minimal path string sizes, and so we inherit the weirdness for `flag`s, as those rules allow for spaces to be dropped.  

I need to gather my notes...  And look at your work above, compared to my unambitious straight translate to EBNF form.

And one of the subprojects I don't know I can get to, is to collect together the multiple sources/versions of tests for path strings.  The W3C tests are old and miss cases.  Chrome/FireFox have tests but they're held in those projects somewhere.  Good and complete tests would have prevented some of the confusion in the 1.5 decades since.  Oh, and give the dozens of implementations of path string parsers something real to test against. (sigh)

-- 
GitHub Notification of comment by tshinnic
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/335#issuecomment-319477694 using your GitHub account

Received on Tuesday, 1 August 2017 19:52:18 UTC