- From: M-Nayeem via GitHub <sysbot+gh@w3.org>
- Date: Fri, 07 Jul 2017 23:59:18 +0000
- To: public-fxtf-archive@w3.org
M-Nayeem has just created a new issue for https://github.com/w3c/fxtf-drafts: == [geometry] "var matrix = new DOMMatrix(); matrix.scaleSelf(..." == https://drafts.fxtf.org/geometry/#example-e679c2a1 > var matrix = new DOMMatrix\(\); > matrix\.scaleSelf\(2\); > matrix\.translateSelf\(20,20\); > console\.assert\(matrix\.toString\(\) === > "matrix\(2, 0, 0, 2, 20, 20\)"\); Shouldn't the resultant matrix be (2, 0, 0 2, 40, 40) ? These transformations are supposedly post multiplications: - matrix = matrix · (2, 0, 0, 2, 0, 0) <-- scale - matrix = matrix · (1, 0, 0, 1, 20, 20) <-- translation (resultant matrix will cause a translation followed by a scale) ...as is suggested by the the descriptions of the method descriptions further below, as is how SVG matrices currently work, and as is how canvas context transformation methods are applied. If I am wrong and they are in fact pre-multiplications: - matrix = (2, 0, 0, 2, 0, 0) · matrix <-- scale - matrix = (1, 0, 0, 1, 20, 20) · matrix <-- translation (resultant matrix will cause a scale followed by a translation) ...could this be better clarified in the method descriptions? "Post-multiply: Term A post-multiplied by term B is equal to A · B." "Pre-multiply: Term A pre-multiplied by term B is equal to B · A." The word "by" is used in these definitions at the beginning of the DOMMatrix section, but later when the terms are used it is written like: "That matrix is post-multiplied *to* this matrix" "That matrix is post-multiplied *on* this matrix" ...which can be unclear. Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/207 using your GitHub account
Received on Friday, 7 July 2017 23:59:24 UTC