Re: [SVG 2] bearing path command and simple drawing of objects with discrete rotation symmetry

On Thu, Feb 13, 2014 at 7:01 AM, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de> wrote:
> Cameron McCormack:
>> You're right there would be an advantage to allowing fractions in here
>> for values like 1/7.  On the other hand we don't allow numbers to be
>> expressed like this anywhere else in SVG.
>
> Well due to CSS one can already note font-size/line-height for font with
> similar syntax, but different meaning of course.

That's a grammar disambiguator, not a fraction.  We use / to separate
things that could be ambiguous when it's not appropriate to use comma
for the job.

>> People have previously asked to be able to use CSS length values in the
>> middle of path data strings, and <polygon> points attributes.  Although
>> we hadn't planned on doing that right now, as it's quite a change, it
>> would let you do fractions using calc().
>
> To have it for already established commands will be more problematic,
> because 'calc' represents already four path commands, even more
> problematic than b, B without a reasonable fall back mechanism for
> current viewers, scripts and programs.

No, it doesn't.  You can't omit the arguments after the c, a, and l
commands, so "calc" showing up in a path command just makes it an
invalid path in legacy user agents, no different than any other new
addition to the path syntax.

> And the parsing might get slower, if a program has to take into account,
> that each number can be a calculable expression -
> this means effectively something completely new to analyse path data.
> The addition of b, B with only degree or with fractions like m/n as well only
> require some addition to a currently already working algorithm, and there
> will be no big complication due to the fraction notation here.
> However, if we forget about a notation in degree, we could
> say one has to note pairs of numbers instead of a fraction:
> B 3,7 instead of B 3/7 - this would align better with current notations.
> The disadvantage of this approach is, that due to current use in SVG,
> a notation in degree is what people already know and expect, if they do
> not think in specific symmetries.

Parsing speed is a complete non-issue; don't worry about it.

~TJ

Received on Thursday, 13 February 2014 17:38:59 UTC