What is the logic behind the signature of the transformation method?

advertisements

According to http://www.html5samples.com/2010/03/html-5-canvas-the-2d-context-part-1/

This is the signature for the context.transform method context.transform(m11, m12, m21, m22, dx, dy) is to multiply the current transformation matrix with the matrix described by:

m11 m21 dx

m12 m22 dy

 0   0  1

I am trying to figure out what is the logic behind this signature? Why can't you set all the elements of the matrix and why are the arguments listed in column order instead of row order?


The notation depeds upon your position vectors being expressed as columns or rows.Nothing bad qith that.

For a comprehensive and easy tutorial (but with your notation reversed) you may look here.

HTH!