[whatwg] [Canvas] Behavior on non-invertable CTM

Justin Novosad junov at google.com
Mon Mar 17 08:45:05 PDT 2014

On Mon, Mar 17, 2014 at 11:35 AM, Dirk Schulze <dschulze at adobe.com> wrote:

> > Hmmm, I gave this a bit more thought...  To apply the construction
> > algorithm in transformed space, the ellipse parameters (radiusX, radiusY,
> > rotation) would have to be transformed. Transforming the parameters would
> > be intractable under a projective transform (e.g. perspective), but since
> > we are limitted to affine transforms, it can be done.  Now, in the case
> of
> > a non-invertible CTM, we would end up with radiusX or radiusY or both
> equal
> > to zero.  And what happens when you have that?  Your arcTo just turned
> into
> > lineTo(x1, y1). Tada!
> Why does radiusX or radiusY need to be zero? Because you define it that
> way for a non-invertible matrix? That makes sense for scale(0,0). What
> about infinity or NaN? If Ian didn’t update the spec then this is still
> undefined and therefore up to the UA to decide.
Oh yeah, I was totally forgetting about singularities caused by non-finite
values.  Could we just the same agree to resolve that case by treating
arcTo as lineTo(x1, y1) in the case of a non-invertible CTM?  Or do you
think there is a more logical thing to do?

More information about the whatwg mailing list