Re: Creating a full circle with one arc command

On Thu, May 24, 2018 at 2:18 AM, Fuzzy Ma <ulima.ums@gmail.com> wrote:
> I just found out, that it is not possible to create an arc which does a full
> circle. I was wondering if this is somewhere written in the specification so
> I searched and found this:
>
>> If the endpoints (x1, y1) and (x2, y2) are identical, then this is
>> equivalent to omitting the elliptical arc segment entirely.
>
> (https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes F.6.2
> Out-of-range parameters)
>
> I was wondering why this was added to the specification. For me it makes
> totally sense to have a full circle when the largeArcFlag is set to 1. 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. If both start and end are the same point, then the
ellipse is allowed to sit *anywhere* so long as it's touching that
point. It might go to the left, it might go to the right, or
up/down/whatever.  You really need all of: two unique points, two
sweep flags, and rotation, or else you don't have a unique ellipse
placement.

> So what were the reasons to disallow a full circle and what are the chances
> to change this chapter in the specification (at least for SVG2)?

It was disallowed due to it having no answer, and there's almost
certainly no chance of changing it at this point - there's likely
compat to worry about at this point.

~TJ

Received on Thursday, 24 May 2018 14:38:25 UTC