Re: Creating a full circle with one arc command

On Thu, 2018-05-24 at 07:37 -0700, Tab Atkins Jr. wrote:
> On Thu, May 24, 2018 at 2:18 AM, Fuzzy Ma <ulima.ums@gmail.com>
> wrote:
> > 
> > [...]

I agree with Tab, but there's a possibly corner case for the WG to
consider i think, if it's worth fixing - we need to say what is meant
exactly by the two coordinates being identical.

> > The
> > maths in (F.6.5 Conversion from endpoint to center
> > parameterization) breaks
> > of course but it does so already when you have a radius of 0 which
> > is already allowed.
> > 
> > Beside the maths everything still makes sense.
> 
> It doesn't, tho. 

Like Tab, i don't grok "this makes sense except for the maths". :)

There's an issue in the SVG 2 draft to make hand-generated paths
easier, and the minutes of the meeting that discussed it mention the
feature you want:
https://www.w3.org/2011/11/04-svg-minutes.html#item08
but using an explicit 360 rather than 0, which might mitigate the
backward compatibility issues.

So i can see this being considered for SVG 2.1 in the future.

In the meantime note that if the end point is very very close to the
start point, you can get an almost-circle:
  <path d = "M 20 200 A 75 75 360 1 1 20 200.00001 z"/>
draws a circle in one implementation i tried, and
<path d = "M 20 200 A 75 75 360 1 1 20 200.00001 z"/>
but
<path d = "M 20 200 A 75 75 360 1 1 20 200.000005 z"/>
does not.
However, in another implementation neither of these produced a circle,
but 0.01 did. Almost. It turns out SVG mandates "at least" single
precision floats, but allows higher.

So i'd support allowing 360 as interop is already less than ideal,
although not until 2.1 as we're in "feature freeze" for 2.0.

You'd still need an explicit z if you wanted a closed path.

Liam

(staff contact for SVG Working Group, but speaking unofficially)

-- 
Liam Quin, W3C, http://www.w3.org/People/Quin/
Staff contact for Verifiable Claims WG, SVG WG, XQuery WG
Improving Web Advertising: https://www.w3.org/community/web-adv/
Personal: awesome vintage art: http://www.fromoldbooks.org/

Received on Thursday, 24 May 2018 20:04:12 UTC