[whatwg] Rename the 7-arg arcTo() to ellipseTo()?

Tab Atkins Jr. jackalmage at gmail.com
Mon Sep 17 10:45:49 PDT 2012


Heya, we at the SVGWG just resolved today to add equivalents for the
CanvasPathMethods interface arc/ellipse/arcTo commands to the <path>
element's syntax.

Ideally, we'd be able to use the same names as Path, for minimal
confusion - "<path d='M0 0 arc 30 30 10 0 90 0'>" producing a line
from (0,0) to (40,30), then a quarter-arc to (30,40).  However, this
is problematic for arcTo(), as it has both a 5-arg (for circular arcs)
and a 7-arg (for elliptical arcs) version.  For one, this is somewhat
inconsistent with the pattern established by the existing arc() and
ellipse() functions.  For two, and worse for SVG, SVG typically allows
you to omit the name of the path command if the immediately previous
command was the same name.  To do this, the command needs to have a
constant number of arguments, so you can just split on every Nth arg.

So, we're going to have to name the 7-arg version something different.
 The obvious answer is "ellipseTo".  Could we change the
CanvasPathMethods interface to do the same?  To the best of my
knowledge, no implementations exist yet for the 7-arg version, so
there's no backwards-compat issues.

~TJ


More information about the whatwg mailing list