Skip to content

Commit ab464b5

Browse files
committed
Added skew() again for compatibility with legacy content
1 parent a39086d commit ab464b5

File tree

4 files changed

+66
-31
lines changed

4 files changed

+66
-31
lines changed

css3-transforms/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2012-08-29 dschulze@adobe.com
2+
Added skew() again for compatibility with legacy content.
3+
14
2012-08-29 dschulze@adobe.com
25
Allow numerical interpolation on rotate3d, when normalized direction vectors are equal.
36

css3-transforms/Overview.html

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,11 @@ <h2 id=definitions><span class=secno>4. </span>Definitions</h2>
547547
class=css>scaleZ(1)</code>’, ‘<code class=css>rotate(0)</code>’,
548548
<code class=css>rotate3d(1, 1, 1, 0)</code>’, ‘<code
549549
class=css>rotateX(0)</code>’, ‘<code class=css>rotateY(0)</code>’,
550-
<code class=css>rotateZ(0)</code>’, ‘<code
551-
class=css>skewX(0)</code>’, ‘<code class=css>skewY(0)</code>’,
552-
<code class=css>matrix(1, 0, 0, 1, 0, 0)</code>’ and ‘<code
553-
class=css>matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
554-
1)</code>’. A special case is perspective: ‘<code
550+
<code class=css>rotateZ(0)</code>’, ‘<code class=css>skew(0,
551+
0)</code>’, ‘<code class=css>skewX(0)</code>’,<code
552+
class=css>skewY(0)</code>’, <code class=css>matrix(1, 0, 0, 1, 0,
553+
0)</code>’ and ‘<code class=css>matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0,
554+
0, 1, 0, 0, 0, 0, 1)</code>’. A special case is perspective: ‘<code
555555
class=css>perspective(infinity)</code>’. The value of m<sub>34</sub>
556556
becomes infinitesimal small and the transform function is therefore
557557
assumed to be equal to the identity matrix.</p>
@@ -2296,24 +2296,26 @@ <h3 id=neutral-element><span class=secno>14.2. </span> Neutral element for
22962296
class=css>rotate3d(v<sub>x</sub>, v<sub>y</sub>, v<sub>z</sub>,
22972297
0)</code>’ (where <var>v</var> is a context dependent vector), ‘<code
22982298
class=css>rotateX(0)</code>’, ‘<code class=css>rotateY(0)</code>’,
2299-
<code class=css>rotateZ(0)</code>’, ‘<code
2300-
class=css>skewX(0)</code>’, ‘<code class=css>skewY(0)</code>’,
2301-
<code class=css>matrix(0, 0, 0, 0, 0, 0)</code>’, ‘<code
2302-
class=css>matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2303-
0)</code> and <code class=css>perspective(0)</code>’.
2299+
<code class=css>rotateZ(0)</code>’, ‘<code class=css>skew(0,
2300+
0)</code>’, skewX(0)<code class=css>, </code>skewY(0)<code
2301+
class=css>, </code>matrix(0, 0, 0, 0, 0, 0)<code class=css>,
2302+
</code>matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)‘<code
2303+
class=css> and </code>perspective(0)<code class=css>. </code>
23042304

23052305
<p class=note> Animations to or from the neutral element of additions
2306-
<code class=css>matrix</code>’, ‘<code class=css>matrix3d</code>
2307-
and ‘<a href="#perspective"><code class=css>perspective</code></a>
2308-
fall back to discrete animations (See <a
2309-
href="#matrix-interpolation">Interpolation of Matrices</a>).
2306+
’matrix'‘<code class=css>, </code>’‘<code
2307+
class=css>matrix3d</code>’‘<code class=css> and </code>’‘<a
2308+
href="#perspective"><code class=property>perspective</code></a>’‘<code
2309+
class=css> fall back to discrete animations (See <a
2310+
href="#matrix-interpolation">Interpolation of Matrices</a>). </code>
23102311

23112312
<div class=example>
23122313
<p> A <var>by</var> animation with a by value v<sub>b</sub> is equivalent
23132314
to the same animation with a values list with 2 values, the neutral
23142315
element for addition for the domain of the target attribute (denoted 0)
2315-
and v<sub>b</sub>, and ‘<code class=css>additive="sum"</code>’. <a
2316-
href="#SMIL3" rel=biblioentry>[SMIL3]<!--{{SMIL3}}--></a></p>
2316+
and v<sub>b</sub>, and ’‘<code
2317+
class=css>additive="sum"</code>’‘<code class=css>. <a href="#SMIL3"
2318+
rel=biblioentry>[SMIL3]<!--{{SMIL3}}--></a> </code></p>
23172319

23182320
<pre>
23192321
&lt;rect width="100" height="100"&gt;
@@ -2322,16 +2324,18 @@ <h3 id=neutral-element><span class=secno>14.2. </span> Neutral element for
23222324
&lt;/rect&gt;</pre>
23232325

23242326
<p> The neutral element for addition when performing a <var>by</var>
2325-
animation with ‘<code class=css>type="scale"</code>’ is the value 0.
2326-
Thus, performing the animation of the example above causes the rectangle
2327-
to be invisible at time 0s (since the animated transform list value is
2328-
<code class=css>scale(0)</code>’), and be scaled back to its
2329-
original size at time 5s (since the animated transform list value is
2330-
<code class=css>scale(1)</code>’).</p>
2327+
animation with ’‘<code class=css>type="scale"</code>’‘<code
2328+
class=css> is the value 0. Thus, performing the animation of the example
2329+
above causes the rectangle to be invisible at time 0s (since the animated
2330+
transform list value is </code>’‘<code
2331+
class=css>scale(0)</code>’‘<code class=css>), and be scaled back to
2332+
its original size at time 5s (since the animated transform list value is
2333+
</code>’‘<code class=css>scale(1)</code>’‘<code class=css>).
2334+
</code></p>
23312335
</div>
23322336

2333-
<h3 id=svg-attribute-name><span class=secno>14.3. </span> The SVG<code
2334-
class=property>attributeName</code> attribute</h3>
2337+
<h3 id=svg-attribute-name><span class=secno>14.3. </span> The SVG
2338+
’attributeName' attribute</h3>
23352339

23362340
<p> <a href="http://www.w3.org/TR/SVG/animate.html">SVG 1.1 Animation</a>
23372341
defines the ‘<code class=css><a
@@ -2440,12 +2444,20 @@ <h3 id=two-d-transform-functions><span class=secno>15.1. </span>2D
24402444

24412445
<dd> specifies a <a href="#RotateDefined">2D rotation</a> by the angle
24422446
specified in the parameter about the origin of the element, as defined by
2443-
the ‘<a href="#transform-origin"><code class=css><code
2444-
class=property>transform-origin</code></code></a>’ property. For
2445-
example, ‘<code class=css><code
2446-
class=css>rotate(90deg)</code></code>’ would cause elements to appear
2447+
the ‘<a href="#transform-origin"><code
2448+
class=property>transform-origin</code></a>’ property. For example,
2449+
<code class=css>rotate(90deg)</code>’ would cause elements to appear
24472450
rotated one-quarter of a turn in the clockwise direction.
24482451

2452+
<dt> <code class=css>skew(&lt;angle&gt;[, &lt;angle&gt;])</code>
2453+
2454+
<dd> specifies a <a href="#SkewDefined">2D skew</a> by [ax,ay] for X and
2455+
Y. If the second parameter is not provided, it has a zero value.
2456+
<p class=note>Note that the behavior of ‘<code class=css>skew</code>
2457+
is different from mutliplying ‘<code class=css>skewX</code>’ with
2458+
<code class=css>skewY</code>’. Implementations must support this
2459+
function for compatibility with legacy content.</p>
2460+
24492461
<dt id=skewX-function> <code class=css>skewX(&lt;angle&gt;)</code>
24502462

24512463
<dd> specifies a <a href="#SkewXDefined">2D skew transformation along the
@@ -3182,6 +3194,13 @@ <h2 id=mathematical-description><span class=secno>21. </span> Mathematical
31823194
href="#Rotate3dDefined">3D rotation</a> with vector [0,0,1] and
31833195
parameter <em>alpha</em>.</p>
31843196

3197+
<li id=SkewDefined>
3198+
<p> A 2D skew like transformation with the parameters <em>alpha</em> and
3199+
<em>beta</em> is equivalent to the matrix:</p>
3200+
<img
3201+
alt="\begin{bmatrix} 1 & \tan(\alpha) & 0 & 0 \\ \tan(\beta) & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}"
3202+
height=106 src=skew.png width=205>
3203+
31853204
<li id=SkewXDefined>
31863205
<p> A 2D skew transformation along the X axis with the parameter
31873206
<em>alpha</em> is equivalent to the matrix:</p>

css3-transforms/Transforms.src.html

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h2 id="definitions">Definitions</h2>
268268
are ''translate(0)'', ''translate3d(0, 0, 0)'', ''translateX(0)'',
269269
''translateY(0)'', ''translateZ(0)'', ''scale(1)'', ''scaleX(1)'', ''scaleY(1)'',
270270
''scaleZ(1)'', ''rotate(0)'', ''rotate3d(1, 1, 1, 0)'', ''rotateX(0)'',
271-
''rotateY(0)'', ''rotateZ(0)'', ''skewX(0)'', ''skewY(0)'', ''matrix(1, 0, 0, 1, 0,
271+
''rotateY(0)'', ''rotateZ(0)'', ''skew(0, 0)'', ''skewX(0)'', ''skewY(0)'', ''matrix(1, 0, 0, 1, 0,
272272
0)'' and ''matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)''. A special
273273
case is perspective: ''perspective(infinity)''. The value of m<sub>34</sub>
274274
becomes infinitesimal small and the transform function is therefore assumed to be
@@ -2139,7 +2139,7 @@ <h3 id="neutral-element">
21392139
''scaleX(0)'', ''scaleY(0)'', ''scaleZ(0)'', ''rotate(0)'',
21402140
''rotate3d(v<sub>x</sub>, v<sub>y</sub>, v<sub>z</sub>, 0)'' (where <var>v</var> is
21412141
a context dependent vector), ''rotateX(0)'', ''rotateY(0)'', ''rotateZ(0)'',
2142-
''skewX(0)'', ''skewY(0)'', ''matrix(0, 0, 0, 0, 0, 0)'', ''matrix3d(0, 0, 0, 0, 0,
2142+
''skew(0, 0)'', skewX(0)'', ''skewY(0)'', ''matrix(0, 0, 0, 0, 0, 0)'', ''matrix3d(0, 0, 0, 0, 0,
21432143
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)'' and ''perspective(0)''.
21442144
</p>
21452145

@@ -2274,9 +2274,16 @@ <h3 id="two-d-transform-functions">2D Transform Functions</h3>
22742274
</dt>
22752275
<dd>
22762276
specifies a <a href="#RotateDefined">2D rotation</a> by the angle specified in the parameter about the origin of the element, as
2277-
defined by the '<code class="property">transform-origin</code>' property. For example, '<code class="css">rotate(90deg)</code>'
2277+
defined by the 'transform-origin' property. For example, ''rotate(90deg)''
22782278
would cause elements to appear rotated one-quarter of a turn in the clockwise direction.
22792279
</dd>
2280+
<dt>
2281+
<code class="css">skew(&lt;angle&gt;[, &lt;angle&gt;])</code>
2282+
</dt>
2283+
<dd>
2284+
specifies a <a href="#SkewDefined">2D skew</a> by [ax,ay] for X and Y. If the second parameter is not provided, it has a zero value.
2285+
<p class="note">Note that the behavior of ''skew'' is different from mutliplying ''skewX'' with ''skewY''. Implementations must support this function for compatibility with legacy content.</p>
2286+
</dd>
22802287
<dt id="skewX-function">
22812288
<code class="css">skewX(&lt;angle&gt;)</code>
22822289
</dt>
@@ -3074,6 +3081,12 @@ <h2 id="mathematical-description">
30743081
with vector [0,0,1] and parameter <em>alpha</em>.
30753082
</p>
30763083
</li>
3084+
<li id="SkewDefined">
3085+
<p>
3086+
A 2D skew like transformation with the parameters <em>alpha</em> and <em>beta</em> is equivalent to the matrix:
3087+
</p>
3088+
<img src="skew.png" alt="\begin{bmatrix} 1 & \tan(\alpha) & 0 & 0 \\ \tan(\beta) & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="205" height="106">
3089+
</li>
30773090
<li id="SkewXDefined">
30783091
<p>
30793092
A 2D skew transformation along the X axis with the parameter <em>alpha</em> is equivalent to the matrix:

css3-transforms/skew.png

1.79 KB
Loading

0 commit comments

Comments
 (0)