[whatwg] Rename the 7-arg arcTo() to ellipseTo()?
Ian Hickson
ian at hixie.ch
Mon Sep 24 15:50:10 PDT 2012
On Mon, 24 Sep 2012, Tab Atkins Jr. wrote:
>
> You are looking at the simplest possible use-case for A/a, nearly the
> only case that can be done without trig, where you're starting and
> stopping the arc at a quarter-turn. Try virtually anything more
> complex, like rotating the square 45deg. Using arcTo it's still trivial
> - you just need to know enough trig to figure out that the corners are
> now at (0, 1.414), etc., and the command takes care of the rest for you.
> With A/a, you need to do a bit more to translate the points of the
> diamond into the start/end of the arc.
>
> Don't even get me started on trying to do a 5-pointed star with rounded
> corners.
>
> In general, if you can do a sharp corner, you can do a rounded corner
> with arcTo. You need no additional information. arcBetween almost
> always needs significantly more information.
Fair enough.
Anyway, my original point stands: I don't see why this would have any
impact on the canvas API. The API to be consistent with is the existing
path API, not the canvas one. If you did want to introduce optional
arguments to the path API, though, that would be relatively trivial; just
introduce a punctuation mark that means "end of arguments", e.g. "/".
B 10,10 20,20 5 / 30,30 40,40 10
...instead of:
B 10,10 20,20 5 5 0 30,30 40,40 10 5 0
...(where B is a command that takes the same arguments as arcTo().)
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list