W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 17 Sep 2012 10:45:49 -0700
Message-ID: <CAAWBYDBF=2JPPB6wqBv3gbFZz3v4yzNew_gO196YCho9QNQMnQ@mail.gmail.com>
To: WHATWG List <whatwg@whatwg.org>
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
Received on Monday, 17 September 2012 17:46:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:45 UTC