|
39 | 39 |
|
40 | 40 | <h1>CSS Transforms</h1> |
41 | 41 |
|
42 | | - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 25 May 2012</h2> |
| 42 | + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 26 May 2012</h2> |
43 | 43 |
|
44 | 44 | <dl> |
45 | 45 | <dt>This version: |
46 | 46 |
|
47 | 47 | <dd> <a |
48 | | - href="http://www.w3.org/TR/2012/ED-css3-transforms-20120525/">http://dev.w3.org/csswg/css3-transforms/</a> |
49 | | - <!--http://www.w3.org/TR/2012/WD-css3-transforms-20120525/--> |
| 48 | + href="http://www.w3.org/TR/2012/ED-css3-transforms-20120526/">http://dev.w3.org/csswg/css3-transforms/</a> |
| 49 | + <!--http://www.w3.org/TR/2012/WD-css3-transforms-20120526/--> |
50 | 50 |
|
51 | 51 | <dt>Latest version: |
52 | 52 |
|
@@ -281,10 +281,13 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2> |
281 | 281 | <li><a href="#svg-animate-element"><span class=secno>14.1. </span> |
282 | 282 | Elements, attributes and properties that can be animated </a> |
283 | 283 |
|
284 | | - <li><a href="#svg-attribute-name"><span class=secno>14.2. </span> The |
| 284 | + <li><a href="#neutral-element"><span class=secno>14.2. </span> Neutral |
| 285 | + element for addition </a> |
| 286 | + |
| 287 | + <li><a href="#svg-attribute-name"><span class=secno>14.3. </span> The |
285 | 288 | SVG ‘<code class=property>attributeName</code>’ attribute </a> |
286 | 289 |
|
287 | | - <li><a href="#svg-animateTransform-extension"><span class=secno>14.3. |
| 290 | + <li><a href="#svg-animateTransform-extension"><span class=secno>14.4. |
288 | 291 | </span> The SVG ‘<code class=property>animateTransform</code>’ |
289 | 292 | element </a> |
290 | 293 | </ul> |
@@ -521,9 +524,9 @@ <h2 id=definitions><span class=secno>4. </span>Definitions</h2> |
521 | 524 | ‘<code class=css>matrix(1, 0, 0, 1, 0, 0)</code>’ and ‘<code |
522 | 525 | class=css>matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, |
523 | 526 | 1)</code>’. A special case is perspective: ‘<code |
524 | | - class=css>perspective(infinity)</code>’. The value of |
525 | | - m<small>34</small> becomes infinitesimal small and the transform |
526 | | - function is therefore assumed to be equal to the identity matrix.</p> |
| 527 | + class=css>perspective(infinity)</code>’. The value of m<sub>34</sub> |
| 528 | + becomes infinitesimal small and the transform function is therefore |
| 529 | + assumed to be equal to the identity matrix.</p> |
527 | 530 |
|
528 | 531 | <dt id=Term3DRenderingContext><dfn id=d-rendering-context>3D rendering |
529 | 532 | context</dfn> |
@@ -556,11 +559,12 @@ <h2 id=two-dimensional-subset><span class=secno>5. </span> Two Dimensional |
556 | 559 | method in "Graphics Gems II, edited by Jim Arvo", simplified for the 2D |
557 | 560 | case. Section <a href="#mathematical-description">Mathematical Description |
558 | 561 | of Transform Functions</a> is still effective but can be reduced by using |
559 | | - a 3x3 transformation matrix where <em>a</em> equals <em>m11</em>, |
560 | | - <em>b</em> equals <em>m12</em>, <em>c</em> equals <em>m21</em>, <em>d</em> |
561 | | - equals <em>m22</em>, <em>e</em> equals <em>m41</em> and <em>f</em> equals |
562 | | - <em>m42</em> (see <a href="#MatrixDefined">A 2D 3x2 matrix with six |
563 | | - parameter</a>). |
| 562 | + a 3x3 transformation matrix where <em>a</em> equals |
| 563 | + <em>m<sub>11</sub></em>, <em>b</em> equals <em>m<sub>12</sub></em>, |
| 564 | + <em>c</em> equals <em>m<sub>21</sub></em>, <em>d</em> equals |
| 565 | + <em>m<sub>22</sub></em>, <em>e</em> equals <em>m<sub>41</sub></em> and |
| 566 | + <em>f</em> equals <em>m<sub>42</sub></em> (see <a href="#MatrixDefined">A |
| 567 | + 2D 3x2 matrix with six parameter</a>). |
564 | 568 |
|
565 | 569 | <div class=figure> <img alt="3x3 matrix" height=79 src=3x3matrix.png |
566 | 570 | title="\begin{bmatrix} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{bmatrix}" |
@@ -2111,7 +2115,53 @@ <h3 id=svg-animate-element><span class=secno>14.1. </span> Elements, |
2111 | 2115 | <td> |
2112 | 2116 | </table> |
2113 | 2117 |
|
2114 | | - <h3 id=svg-attribute-name><span class=secno>14.2. </span> The SVG ‘<code |
| 2118 | + <h3 id=neutral-element><span class=secno>14.2. </span> Neutral element for |
| 2119 | + addition</h3> |
| 2120 | + |
| 2121 | + <p> Some animations require a neutral element for addition. This neutral |
| 2122 | + element for transform functions must be equivalent to the null matrix. |
| 2123 | + Examples for transform functions and their values that fulfill this |
| 2124 | + requirement are ‘<code class=css>translate(0)</code>’, ‘<code |
| 2125 | + class=css>translate3d(0, 0, 0)</code>’, ‘<code |
| 2126 | + class=css>translateX(0)</code>’, ‘<code |
| 2127 | + class=css>translateY(0)</code>’, ‘<code |
| 2128 | + class=css>translateZ(0)</code>’, ‘<code class=css>scale(0)</code>’, |
| 2129 | + ‘<code class=css>scaleX(0)</code>’, ‘<code |
| 2130 | + class=css>scaleY(0)</code>’, ‘<code class=css>scaleZ(0)</code>’, |
| 2131 | + ‘<code class=css>rotate(0)</code>’, <!--''rotate3d(1, 1, 1, 0)'',--> |
| 2132 | + ‘<code class=css>rotateX(0)</code>’, ‘<code |
| 2133 | + class=css>rotateY(0)</code>’, ‘<code class=css>rotateZ(0)</code>’, |
| 2134 | + ‘<code class=css>skewX(0)</code>’, ‘<code |
| 2135 | + class=css>skewY(0)</code>’, ‘<code class=css>matrix(0, 0, 0, 0, 0, |
| 2136 | + 0)</code>’ and ‘<code class=css>matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 2137 | + 0, 0, 0, 0, 0, 0)</code>’. A special case is perspective: ‘<code |
| 2138 | + class=css>perspective(infinity)</code>’. The value of m<sub>34</sub> |
| 2139 | + becomes infinitesimal small and the transform function is therefore |
| 2140 | + assumed to be equal to the null matrix. |
| 2141 | + |
| 2142 | + <div class=example> |
| 2143 | + <p> A <var>by</var> animation with a by value v<sub>b</sub> is equivalent |
| 2144 | + to the same animation with a values list with 2 values, the neutral |
| 2145 | + element for addition for the domain of the target attribute (denoted 0) |
| 2146 | + and v<sub>b</sub>, and ‘<code class=css>additive="sum"</code>’. |
| 2147 | + [[SMILANIM]]</p> |
| 2148 | + |
| 2149 | + <pre> |
| 2150 | +<rect width="100" height="100"> |
| 2151 | + <animateTransform attributeName="transform" attributeType="XML" |
| 2152 | + type="scale" by="1" dur="5s" fill="freeze"/> |
| 2153 | +</rect></pre> |
| 2154 | + |
| 2155 | + <p> The neutral element for addition when performing a <var>by</var> |
| 2156 | + animation with ‘<code class=css>type="scale"</code>’ is the value 0. |
| 2157 | + Thus, performing the animation of the example above causes the rectangle |
| 2158 | + to be invisible at time 0s (since the animated transform list value is |
| 2159 | + ‘<code class=css>scale(0)</code>’), and be scaled back to its |
| 2160 | + original size at time 5s (since the animated transform list value is |
| 2161 | + ‘<code class=css>scale(1)</code>’).</p> |
| 2162 | + </div> |
| 2163 | + |
| 2164 | + <h3 id=svg-attribute-name><span class=secno>14.3. </span> The SVG ‘<code |
2115 | 2165 | class=property>attributeName</code>’ attribute</h3> |
2116 | 2166 |
|
2117 | 2167 | <p> <a href="http://www.w3.org/TR/SVG/animate.html">SVG 1.1 Animation</a> |
@@ -2149,7 +2199,7 @@ <h3 id=svg-attribute-name><span class=secno>14.2. </span> The SVG ‘<code |
2149 | 2199 | translation of the second animation one after the other.</p> |
2150 | 2200 | </div> |
2151 | 2201 |
|
2152 | | - <h3 id=svg-animateTransform-extension><span class=secno>14.3. </span> The |
| 2202 | + <h3 id=svg-animateTransform-extension><span class=secno>14.4. </span> The |
2153 | 2203 | SVG ‘<code class=property>animateTransform</code>’ element</h3> |
2154 | 2204 |
|
2155 | 2205 | <p> This specification introduces new transform functions that are not |
|
0 commit comments