[whatwg] Canvas transform() and matrix element notation

> Date: Mon, 19 Jul 2010 14:33:01 -0700
> From: david at davidflanagan.com
> To: bzbarsky at MIT.EDU
> CC: whatwg at lists.whatwg.org
> Subject: Re: [whatwg] Canvas transform() and matrix element notation
> 
> Boris Zbarsky wrote:
> > On 7/19/10 4:13 PM, David Flanagan wrote:
> >> The spec describes the transform() method as follows:
> >>
> >>> The transform(m11, m12, m21, m22, dx, dy) method must multiply the
> >>> current transformation matrix with the matrix described by:
> >>>
> >>> m11 m21 dx
> >>> m12 m22 dy
> >>> 0 0 1
> >>
> >> The first number in these argument names is the column number and the
> >> second is the row number.
> > 
> > I agree that this is somewhat weird at first glance, but it seems to be 
> > not uncommon for graphics libraries.  For example, for cairo the call
> > 
> >   cairo_matrix_init(m, a, b, c, d, e, f);
> > 
> > creates a matrix which represents the affine transformation [1]:
> > 
> >  x_new = a*x + c*y + e;
> >  y_new = b*x + d*y + f;
> > 
> 
> Thanks for checking this; it is nice to know that there is precedent for 
> the argument order. Changing the argument names to remove the numbers 
> from them would make the spec less confusing.  Or at least changing the 
> argument names so that they use (standard?) row,column indexing instead 
> of column,row indexing.
> 
>      David

But I think the number can indicate the position of the value in the matrix,if change them into "a,b,c..." like cairo, I think it will still confuse the beginner. 		 	   		  
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now. 		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100720/8f8d64c0/attachment.htm>

Received on Monday, 19 July 2010 14:44:37 UTC