2Dapi; hixie: Try to reduce confusion over the transformation API's arguments (whatwg r5279)

2Dapi; hixie: Try to reduce confusion over the transformation API's
arguments (whatwg r5279)

http://dev.w3.org/cvsweb/html5/2dcontext/Overview.html?r1=1.59&r2=1.60&f=h
http://html5.org/tools/web-apps-tracker?from=5278&to=5279

===================================================================
RCS file: /sources/public/html5/2dcontext/Overview.html,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- Overview.html 11 Aug 2010 03:50:07 -0000 1.59
+++ Overview.html 11 Aug 2010 18:25:10 -0000 1.60
@@ -470,8 +470,8 @@
   void <a href="#dom-context-2d-scale" title="dom-context-2d-scale">scale</a>(in float x, in float y);
   void <a href="#dom-context-2d-rotate" title="dom-context-2d-rotate">rotate</a>(in float angle);
   void <a href="#dom-context-2d-translate" title="dom-context-2d-translate">translate</a>(in float x, in float y);
-  void <a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
-  void <a href="#dom-context-2d-settransform" title="dom-context-2d-setTransform">setTransform</a>(in float m11, in float m12, in float m21, in float m22, in float dx, in float dy);
+  void <a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(in float a, in float b, in float c, in float d, in float e, in float f);
+  void <a href="#dom-context-2d-settransform" title="dom-context-2d-setTransform">setTransform</a>(in float a, in float b, in float c, in float d, in float e, in float f);
 <!--
   // v5 we've also received requests for:
   void skew(...);
@@ -714,7 +714,7 @@
 
    </dd>
 
-   <dt><var title="">context</var> . <code title="dom-context-2d-transform"><a href="#dom-context-2d-transform">transform</a></code>(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>, <var title="">dy</var>)</dt>
+   <dt><var title="">context</var> . <code title="dom-context-2d-transform"><a href="#dom-context-2d-transform">transform</a></code>(<var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>, <var title="">f</var>)</dt>
 
    <dd>
 
@@ -722,7 +722,7 @@
 
    </dd>
 
-   <dt><var title="">context</var> . <code title="dom-context-2d-setTransform"><a href="#dom-context-2d-settransform">setTransform</a></code>(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>, <var title="">dy</var>)</dt>
+   <dt><var title="">context</var> . <code title="dom-context-2d-setTransform"><a href="#dom-context-2d-settransform">setTransform</a></code>(<var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>, <var title="">f</var>)</dt>
 
    <dd>
 
@@ -749,25 +749,29 @@
   the translation distance in the horizontal direction and the <var title="">y</var> argument represents the translation distance in the
   vertical direction. The arguments are in coordinate space units.</p>
 
-  <p>The <dfn id="dom-context-2d-transform" title="dom-context-2d-transform"><code>transform(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
-  <var title="">dy</var>)</code></dfn> method must multiply the
+  <p>The <dfn id="dom-context-2d-transform" title="dom-context-2d-transform"><code>transform(<var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>,
+  <var title="">f</var>)</code></dfn> method must multiply the
   current transformation matrix with the matrix described by:</p>
 
-  </div><table class="matrix"><tr><td><var title="">m11</var></td>
-    <td><var title="">m21</var></td>
-    <td><var title="">dx</var></td>
-   <tr><td><var title="">m12</var></td>
-    <td><var title="">m22</var></td>
-    <td><var title="">dy</var></td>
+  </div><table class="matrix"><tr><td><var title="">a</var></td>
+    <td><var title="">c</var></td>
+    <td><var title="">e</var></td>
+   <tr><td><var title="">b</var></td>
+    <td><var title="">d</var></td>
+    <td><var title="">f</var></td>
    <tr><td>0</td>
     <td>0</td>
     <td>1</td>
-   </table><div class="impl">
+   </table><p class="note">The arguments <var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>, and <var title="">f</var> are sometimes called
+  <var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
+  and <var title="">dy</var> or <var title="">m11</var>, <var title="">m21</var>, <var title="">m12</var>, <var title="">m22</var>, <var title="">dx</var>, and <var title="">dy</var>. Care should be taken in particular with the order
+  of the second and third arguments (<var title="">b</var> and <var title="">c</var>) as their order varies from API to API and APIs
+  sometimes use the notation <var title="">m12</var>/<var title="">m21</var> and sometimes <var title="">m21</var>/<var title="">m12</var> for those positions.<div class="impl">
 
-  <p>The <dfn id="dom-context-2d-settransform" title="dom-context-2d-setTransform"><code>setTransform(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
-  <var title="">dy</var>)</code></dfn> method must reset the current
-  transform to the identity matrix, and then invoke the <code><a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(<var title="">m11</var>, <var title="">m12</var>, <var title="">m21</var>, <var title="">m22</var>, <var title="">dx</var>,
-  <var title="">dy</var>)</code> method with the same arguments.</p>
+  <p>The <dfn id="dom-context-2d-settransform" title="dom-context-2d-setTransform"><code>setTransform(<var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>,
+  <var title="">f</var>)</code></dfn> method must reset the current
+  transform to the identity matrix, and then invoke the <code><a href="#dom-context-2d-transform" title="dom-context-2d-transform">transform</a>(<var title="">a</var>, <var title="">b</var>, <var title="">c</var>, <var title="">d</var>, <var title="">e</var>,
+  <var title="">f</var>)</code> method with the same arguments.</p>
 
   </div><h2 id="compositing"><span class="secno">4 </span>Compositing</h2><dl class="domintro"><dt><var title="">context</var> . <code title="dom-context-2d-globalAlpha"><a href="#dom-context-2d-globalalpha">globalAlpha</a></code> [ = <var title="">value</var> ]</dt>

Received on Wednesday, 11 August 2010 18:26:02 UTC