Skip to content

Commit 8d9f16f

Browse files
committed
[css-transforms] Move images into an images folder.
1 parent d5172ff commit 8d9f16f

20 files changed

Lines changed: 324 additions & 194 deletions

css-transforms/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2015-7-15 Simon Fraser <simon.fraser@apple.com>
2+
Move images into an images folder.
3+
14
2015-1-29 Simon Fraser <simon.fraser@apple.com>
25
Note that transform-style: preserve-3d creates stacking context and containing block.
36

css-transforms/Overview.html

Lines changed: 307 additions & 180 deletions
Large diffs are not rendered by default.

css-transforms/Overview.src.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ <h2 id="two-dimensional-subset">Two Dimensional Subset</h2>
192192
UAs may not always be able to render three-dimensional transforms and then just support a two-dimensional subset of this specification. In this case <a href="#three-d-transform-functions">three-dimensional transforms</a> and the properties 'transform-style', 'perspective', 'perspective-origin' and 'backface-visibility' must not be supported. Section <a href="#3d-transform-rendering">3D Transform Rendering</a> does not apply. Matrix decomposing uses the technique taken from the "unmatrix" method in "Graphics Gems II, edited by Jim Arvo", simplified for the 2D case. Section <a href="#mathematical-description">Mathematical Description of Transform Functions</a> is still effective but can be reduced by using a 3x3 transformation matrix where <em>a</em> equals m<sub>11</sub>, <em>b</em> equals m<sub>12</sub>, <em>c</em> equals m<sub>21</sub>, <em>d</em> equals m<sub>22</sub>, <em>e</em> equals m<sub>41</sub> and <em>f</em> equals m<sub>42</sub> (see <a href="#MatrixDefined">A 2D 3x2 matrix with six parameter</a>).
193193

194194
<div class="figure">
195-
<img src="3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b
195+
<img src="images/3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b
196196
& d & f \\ 0 & 0 & 1 \end{bmatrix}" width="82" height="79">
197197
<p class="caption">
198198
3x3 matrix for two-dimensional transformations.
@@ -232,7 +232,7 @@ <h2 id="transform-rendering">The Transform Rendering Model</h2>
232232
The coordinate space is a coordinate system with two axes: the X axis increases horizontally to the right; the Y axis increases vertically downwards. Three-dimensional transform functions extend this coordinate space into three dimensions, adding a Z axis perpendicular to the plane of the screen, that increases towards the viewer.
233233

234234
<div class="figure">
235-
<img src="coordinates.svg" width="270" height="240" alt="Demonstration of the initial coordinate space">
235+
<img src="images/coordinates.svg" width="270" height="240" alt="Demonstration of the initial coordinate space">
236236
<p class="caption">
237237
Demonstration of the initial coordinate space.
238238
</p>
@@ -354,7 +354,7 @@ <h4 id="perspective">Perspective</h4>
354354
The 'perspective' and 'perspective-origin' properties can be used to add a feeling of depth to a scene by making elements higher on the Z axis (closer to the viewer) appear larger, and those further away to appear smaller. The scaling is proportional to <var>d</var>/(<var>d</var> &minus; <var>Z</var>) where <var>d</var>, the value of 'perspective', is the distance from the drawing plane to the the assumed position of the viewer's eye.
355355

356356
<div class="figure">
357-
<img alt="Diagram of scale vs. Z position" src="perspective_distance.png">
357+
<img alt="Diagram of scale vs. Z position" src="images/perspective_distance.png">
358358
<p class="caption">
359359
Diagrams showing how scaling depends on the 'perspective' property and Z position. In the top diagram, <var>Z</var> is half of <var>d</var>. In order to make it appear that the original circle (solid outline) appears at <var>Z</var> (dashed circle), the circle is scaled up by a factor of two, resulting in the light blue circle. In the bottom diagram, the circle is scaled down by a factor of one-third to make it appear behind the original position.
360360
</p>
@@ -363,7 +363,7 @@ <h4 id="perspective">Perspective</h4>
363363
Normally the assumed position of the viewer's eye is centered on a drawing. This position can be moved if desired &ndash; for example, if a web page contains multiple drawings that should share a common perspective &ndash; by setting 'perspective-origin'.
364364

365365
<div class="figure">
366-
<img alt="Diagram of different perspective-origin" src="perspective_origin.png">
366+
<img alt="Diagram of different perspective-origin" src="images/perspective_origin.png">
367367
<p class="caption">
368368
Diagram showing the effect of moving the perspective origin upward.
369369
</p>
@@ -2372,7 +2372,7 @@ <h2 id="mathematical-description">
23722372

23732373
Mathematically, all transform functions can be represented as 4x4 transformation matrices of the following form:
23742374

2375-
<img src="4x4matrix.png" alt="\begin{bmatrix} m11 & m21 & m31 & m41 \\ m12 & m22 & m32 & m42 \\ m13 & m23 & m33 & m43 \\ m14 & m24 & m34 & m44 \end{bmatrix}" width="222" height="106">
2375+
<img src="images/4x4matrix.png" alt="\begin{bmatrix} m11 & m21 & m31 & m41 \\ m12 & m22 & m32 & m42 \\ m13 & m23 & m33 & m43 \\ m14 & m24 & m34 & m44 \end{bmatrix}" width="222" height="106">
23762376

23772377
One translation unit on a matrix is equivalent to 1 pixel in the local coordinate system of the element.
23782378

@@ -2381,7 +2381,7 @@ <h2 id="mathematical-description">
23812381
<p>
23822382
A 2D 3x2 matrix with six parameters <em>a</em>, <em>b</em>, <em>c</em>, <em>d</em>, <em>e</em> and <em>f</em> is equivalent to the matrix:
23832383
</p>
2384-
<img src="matrix.png" alt="\begin{bmatrix} a & c & 0 & e \\ b & d & 0 & f \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="108" height="106">
2384+
<img src="images/matrix.png" alt="\begin{bmatrix} a & c & 0 & e \\ b & d & 0 & f \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="108" height="106">
23852385
</li>
23862386
<li id="TranslateDefined">
23872387
<p>
@@ -2404,47 +2404,47 @@ <h2 id="mathematical-description">
24042404
<p>
24052405
A 2D skew like transformation with the parameters <em>alpha</em> and <em>beta</em> is equivalent to the matrix:
24062406
</p>
2407-
<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">
2407+
<img src="images/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">
24082408
</li>
24092409
<li id="SkewXDefined">
24102410
<p>
24112411
A 2D skew transformation along the X axis with the parameter <em>alpha</em> is equivalent to the matrix:
24122412
</p>
2413-
<img src="skewX.png" alt="\begin{bmatrix} 1 & \tan(\alpha) & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="155" height="106">
2413+
<img src="images/skewX.png" alt="\begin{bmatrix} 1 & \tan(\alpha) & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="155" height="106">
24142414
</li>
24152415
<li id="SkewYDefined">
24162416
<p>
24172417
A 2D skew transformation along the Y axis with the parameter <em>beta</em> is equivalent to the matrix:
24182418
</p>
2419-
<img src="skewY.png" alt="\begin{bmatrix} 1 & 0 & 0 & 0 \\ \tan(\beta) & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="155" height="106">
2419+
<img src="images/skewY.png" alt="\begin{bmatrix} 1 & 0 & 0 & 0 \\ \tan(\beta) & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="155" height="106">
24202420
</li>
24212421
<li id="Translate3dDefined">
24222422
<p>
24232423
A 3D translation with the parameters <em>tx</em>, <em>ty</em> and <em>tz</em> is equivalent to the matrix:
24242424
</p>
2425-
<img src="translate3d.png" alt="\begin{bmatrix} 1 & 0 & 0 & tx \\ 0 & 1 & 0 & ty \\ 0 & 0 & 1 & tz \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="114" height="106">
2425+
<img src="images/translate3d.png" alt="\begin{bmatrix} 1 & 0 & 0 & tx \\ 0 & 1 & 0 & ty \\ 0 & 0 & 1 & tz \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="114" height="106">
24262426
</li>
24272427
<li id="Scale3dDefined">
24282428
<p>
24292429
A 3D scaling with the parameters <em>sx</em>, <em>sy</em> and <em>sz</em> is equivalent to the matrix:
24302430
</p>
2431-
<img src="scale3d.png" alt="\begin{bmatrix} sx & 0 & 0 & 0 \\ 0 & sy & 0 & 0 \\ 0 & 0 & sz & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="137" height="106">
2431+
<img src="images/scale3d.png" alt="\begin{bmatrix} sx & 0 & 0 & 0 \\ 0 & sy & 0 & 0 \\ 0 & 0 & sz & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="137" height="106">
24322432
</li>
24332433
<li id="Rotate3dDefined">
24342434
<p>
24352435
A 3D rotation with the vector [x,y,z] and the parameter <em>alpha</em> is equivalent to the matrix:
24362436
</p>
2437-
<img src="rotate3dmatrix.png" alt="\begin{bmatrix} 1 - 2 \cdot (y^2 + z^2) \cdot sq & 2 \cdot (x \cdot y \cdot sq - z \cdot sc) & 2 \cdot (x \cdot z \cdot sq + y \cdot sc) & 0 \\ 2 \cdot (x \cdot y \cdot sq + z \cdot sc) & 1 - 2 \cdot (x^2 + z^2) \cdot sq & 2 \cdot (y \cdot z \cdot sq - x \cdot sc) & 0 \\ 2 \cdot (x \cdot z \cdot sq - y \cdot sc) & 2 \cdot (y \cdot z \cdot sq + x \cdot sc) & 1 - 2 \cdot (x^2 + y^2) \cdot sq & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="647" height="106">
2437+
<img src="images/rotate3dmatrix.png" alt="\begin{bmatrix} 1 - 2 \cdot (y^2 + z^2) \cdot sq & 2 \cdot (x \cdot y \cdot sq - z \cdot sc) & 2 \cdot (x \cdot z \cdot sq + y \cdot sc) & 0 \\ 2 \cdot (x \cdot y \cdot sq + z \cdot sc) & 1 - 2 \cdot (x^2 + z^2) \cdot sq & 2 \cdot (y \cdot z \cdot sq - x \cdot sc) & 0 \\ 2 \cdot (x \cdot z \cdot sq - y \cdot sc) & 2 \cdot (y \cdot z \cdot sq + x \cdot sc) & 1 - 2 \cdot (x^2 + y^2) \cdot sq & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}" width="647" height="106">
24382438
<p>
24392439
where:
24402440
</p>
2441-
<img src="rotate3dvariables.png" alt="\newline sc = \sin (\alpha/2) \cdot \cos (\alpha/2) \newline sq = \sin^2 (\alpha/2)" width="221" height="50">
2441+
<img src="images/rotate3dvariables.png" alt="\newline sc = \sin (\alpha/2) \cdot \cos (\alpha/2) \newline sq = \sin^2 (\alpha/2)" width="221" height="50">
24422442
</li>
24432443
<li id="PerspectiveDefined">
24442444
<p>
24452445
A perspective projection matrix with the parameter <em>d</em> is equivalent to the matrix:
24462446
</p>
2447-
<img src="perspective.png" alt="\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & -1/d & 1 \end{bmatrix}" width="143" height="106">
2447+
<img src="images/perspective.png" alt="\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & -1/d & 1 \end{bmatrix}" width="143" height="106">
24482448
</li>
24492449
</ul>
24502450

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)