Re: [whatwg] Canvas arcTo method

Hi Rik,

> The 'scale(2,1)' set up a different coordinate system. You can rewrite
> your code from this:
>
>     ctx.lineTo(100, 100);
>     ctx.scale(2, 1);
>     ctx.arcTo(100, 100, 100, 200, 100);
>
> to this:
>
>     ctx.scale(2, 1);
>     *ctx.lineTo(50, 100);*
>     ctx.arcTo(100, 100, 100, 200, 100);

Right, these will produce the same arc. But how should this be 
implemented in the user agent?

It's almost like it is getting the last point in the previous subpath, 
transforming it by the inverse of the current transformation matrix, 
generating the arc, and then transforming the arc by the matrix.

Is this what Firefox and Chrome do? There is no hint of this in the 
spec, which is quite ambiguous about how the current transform should 
affect previous subpaths.

Cheers,

Michael

Received on Tuesday, 21 August 2012 00:55:39 UTC