[whatwg] Canvas feedback (various threads)

Boris Zbarsky wrote:
> On 8/11/10 5:42 PM, David Flanagan wrote:
>> I think that the sentence "The transformations must be performed in
>> reverse order" is sufficient to remove the ambiguity in multiplication
>> order.
> 
> It is?  It sounds pretty confusing to me... reverse from what?

I agree that it is confusing.  But Ian had asked whether it is possible 
to implement the spec, as now written, incorrectly.  I suspect that any 
implementation that did transformations wrong would violate the spec 
somewhere.  I still think it is worth clarifying the spec, but by Ian's 
criteria, I suspect it is not strictly necessary.

> The right way to specify what happens when composing two transformations 
> is to just explicitly say which transformation is applied first, instead 
> of talking about the algebraic operations on the matrix representations. 
>  In my opinion.

But if you don't talk about the algebraic operations then you haven't 
really defined what a transformation is, have you?

> 
>> must set the current transformation matrix to the matrix obtained by
>> postmultiplying the current transformation matrix with this matrix:
>>
>> a c e
>> b d f
>> 0 0 1
> 
> See, that makes inherent assumptions about row vs column vectors that 
> aren't stated anywhere, right?

I suppose it does.  So to be complete, the spec would have to show the 
math required to transform a point (x,y) using the CTM.

Are you suggesting that there is some way that the spec can be written 
generically without any assumptions about row vector or column vector 
format?  Note that the matrix shown above already appears in the current 
version of the transform() method description.  I don't see how to avoid 
picking one form or another unless you want to define a CTM as an array 
of 6 numbers and show the formulas for updating each of those numbers 
without referring to matrix multiplication at all.

	David

> -Boris
> 

Received on Thursday, 12 August 2010 07:59:48 UTC