Skip to content

Commit ecc6986

Browse files
dirkschulzesvgeesus
authored andcommitted
Incorporate feedback from Robert O'Callahan.
1 parent 8f29eed commit ecc6986

2 files changed

Lines changed: 63 additions & 53 deletions

File tree

matrix/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2013-03-13 Dirk Schulze <dschulze@adobe.com>
2+
Incorporate feedback from Robert O'Callahan.
3+
http://lists.w3.org/Archives/Public/public-fx/2013JanMar/0128.html
4+
15
2013-03-11 Dirk Schulze <dschulze@adobe.com>
26
Add Conformance section.
37

matrix/index.html

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ <h2>The <a>DecomposedMatrix</a> dictionary</h2>
118118
</dd>
119119
</dl>
120120

121+
<p class='issue'>Define initial values.</p>
122+
121123
<p class='issue'>
122124
It is doubtful that this can be very useful for authors. On the other hand, it allows scripted animations similar to the animations by CSS3 Transforms.
123125
</p>
@@ -160,6 +162,7 @@ <h3>The constructors</h3>
160162
</div>
161163
<p class='issue'>Should it be postponed to avoid CSS3 Transforms dependency?</p>
162164
<p class='issue'>Should unit-less values (like for SVG transform presentation attribute) be allowed too? <code>"translate(20,20)"</code></p>
165+
<p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>DOMString</code> parameter does not validate to a transform list [[!CSS3-TRANSFORMS]].
163166
</dd>
164167
<dt>Constructor()</dt>
165168
<dd>
@@ -185,6 +188,7 @@ <h3>The constructors</h3>
185188
Create an identity matrix first. An Float32array [[!TYPED-ARRAYS]] of 6 items sets the element values <code>a</code> to <code>f</code>. An array of 16 items sets the element values <code>m11</code> to <code>m44</code>.
186189
</dd>
187190
</dl>
191+
<p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>Float32array</code> parameter does not consist of 6 or 16 items.
188192
</dd>
189193
<dt>Constructor()</dt>
190194
<dd>
@@ -194,6 +198,7 @@ <h3>The constructors</h3>
194198
Create an identity matrix first. An Float64array [[!TYPED-ARRAYS]] of 6 items sets the element values <code>a</code> to <code>f</code>. An array of 16 items sets the element values <code>m11</code> to <code>m44</code>.
195199
</dd>
196200
</dl>
201+
<p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the <code>Float64array</code> parameter does not consist of 6 or 16 items.
197202
</dd>
198203
<dt>Constructor()</dt>
199204
<dd>
@@ -203,14 +208,15 @@ <h3>The constructors</h3>
203208
Create an identity matrix first. A sequence of 6 items sets the element values <code>a</code> to <code>f</code>. A sequence of 16 items sets the element values <code>m11</code> to <code>m44</code>.
204209
</dd>
205210
</dl>
211+
<p>Throws a <var>DOMException</var> with name <code>SyntaxError</code> if the number sequence parameter does not consist of 6 or 16 items.
206212
</dd>
207213
</section>
208214

209215
<section>
210216
<h3>Two-dimensional attributes</h3>
211217

212218
<p>
213-
If a <a>Matrix</a> just consists of 2D transformations the 6 values <code>a</code> to <code>f</code> can represent the transformation matrix. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on setting the attributes.
219+
If a <a>Matrix</a> just consists of 2D transformations the 6 values <code>a</code> to <code>f</code> can represent the transformation matrix. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on setting the attributes.
214220
</p>
215221

216222
<p>
@@ -251,7 +257,7 @@ <h3>Two-dimensional attributes</h3>
251257
<h3>Three-dimensional attributes</h3>
252258

253259
<p>
254-
The following attributes <code>m11</code> to <code>m44</code> represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on setting the attributes.
260+
The following attributes <code>m11</code> to <code>m44</code> represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on setting the attributes.
255261
</p>
256262

257263
<dl title='partial interface Matrix' class='idl'>
@@ -381,10 +387,10 @@ <h3>Immutable transformation methods</h3>
381387
<dl class='parameters'>
382388
<dt>double scale</dt>
383389
<dd>Multiplier for a uniform scale transformation.</dd>
384-
<dt>optional double originX</dt>
385-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
386-
<dt>optional double originY</dt>
387-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
390+
<dt>optional double originX = 0</dt>
391+
<dd>Transformation origin on the x-axis.</dd>
392+
<dt>optional double originY = 0</dt>
393+
<dd>Transformation origin on the y-axis.</dd>
388394
</dl>
389395
Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = scale</code>) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified.
390396
</dd>
@@ -393,12 +399,12 @@ <h3>Immutable transformation methods</h3>
393399
<dl class='parameters'>
394400
<dt>double scale</dt>
395401
<dd>Multiplier for a uniform scale transformation.</dd>
396-
<dt>optional double originX</dt>
397-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
398-
<dt>optional double originY</dt>
399-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
400-
<dt>optional double originZ</dt>
401-
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
402+
<dt>optional double originX = 0</dt>
403+
<dd>Transformation origin on the x-axis.</dd>
404+
<dt>optional double originY = 0</dt>
405+
<dd>Transformation origin on the y-axis.</dd>
406+
<dt>optional double originZ = 0</dt>
407+
<dd>Transformation origin on the z-axis.</dd>
402408
</dl>
403409
Post-multiplies a uniform scale transformation (<code>m11 = m22 = m33 = scale</code>) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified.
404410
</dd>
@@ -407,16 +413,16 @@ <h3>Immutable transformation methods</h3>
407413
<dl class='parameters'>
408414
<dt>double scaleX</dt>
409415
<dd>Multiplier for a non-uniform scale along the x-axis.</dd>
410-
<dt>optional double scaleY</dt>
411-
<dd>Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.</dd>
412-
<dt>optional double scaleZ</dt>
413-
<dd>Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.</dd>
414-
<dt>optional double originX</dt>
415-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
416-
<dt>optional double originY</dt>
417-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
418-
<dt>optional double originZ</dt>
419-
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
416+
<dt>optional double scaleY = 1</dt>
417+
<dd>Multiplier for a non-uniform scale along the y-axis.</dd>
418+
<dt>optional double scaleZ = 1</dt>
419+
<dd>Multiplier for a non-uniform scale along the z-axis.</dd>
420+
<dt>optional double originX = 0</dt>
421+
<dd>Transformation origin on the x-axis.</dd>
422+
<dt>optional double originY = 0</dt>
423+
<dd>Transformation origin on the y-axis.</dd>
424+
<dt>optional double originZ = 0</dt>
425+
<dd>Transformation origin on the z-axis.</dd>
420426
</dl>
421427
Post-multiplies a non-uniform scale transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified.
422428
</dd>
@@ -425,10 +431,10 @@ <h3>Immutable transformation methods</h3>
425431
<dl class='parameters'>
426432
<dt>double angle</dt>
427433
<dd>Rotation angle in degrees.</dd>
428-
<dt>optional double originX</dt>
429-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
430-
<dt>optional double originY</dt>
431-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
434+
<dt>optional double originX = 0</dt>
435+
<dd>Transformation origin on the x-axis.</dd>
436+
<dt>optional double originY = 0</dt>
437+
<dd>Transformation origin on the y-axis.</dd>
432438
</dl>
433439
Post-multiplies a rotation transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified.
434440
</dd>
@@ -506,7 +512,7 @@ <h3>Immutable transformation methods</h3>
506512
<h3>Mutable transformation methods</h3>
507513

508514
<p>
509-
The following methods do modify the current matrix. If the <a>Matrix</a> object is immutable, a DOMException of type <code>NoModificationAllowedError</code> must be thrown on calling the operations below.
515+
The following methods do modify the current matrix. If the <a>Matrix</a> object is immutable, a <var>DOMException</var> with name <code>NoModificationAllowedError</code> must be thrown on calling the operations below.
510516
</p>
511517

512518
<dl title='partial interface Matrix' class='idl'>
@@ -545,10 +551,10 @@ <h3>Mutable transformation methods</h3>
545551
<dl class='parameters'>
546552
<dt>double scale</dt>
547553
<dd>Multiplier for a uniform scale transformation.</dd>
548-
<dt>optional double originX</dt>
549-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
550-
<dt>optional double originY</dt>
551-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
554+
<dt>optional double originX = 0</dt>
555+
<dd>Transformation origin on the x-axis.</dd>
556+
<dt>optional double originY = 0</dt>
557+
<dd>Transformation origin on the y-axis.</dd>
552558
</dl>
553559
Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = scale</code>) on the current matrix with the given origin.
554560
</dd>
@@ -557,12 +563,12 @@ <h3>Mutable transformation methods</h3>
557563
<dl class='parameters'>
558564
<dt>double scale</dt>
559565
<dd>Multiplier for a uniform scale transformation.</dd>
560-
<dt>optional double originX</dt>
561-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
562-
<dt>optional double originY</dt>
563-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
564-
<dt>optional double originZ</dt>
565-
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
566+
<dt>optional double originX = 0</dt>
567+
<dd>Transformation origin on the x-axis.</dd>
568+
<dt>optional double originY = 0</dt>
569+
<dd>Transformation origin on the y-axis.</dd>
570+
<dt>optional double originZ = 0</dt>
571+
<dd>Transformation origin on the z-axis.</dd>
566572
</dl>
567573
Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = m33 = scale</code>) on the current matrix with the given origin.
568574
</dd>
@@ -571,16 +577,16 @@ <h3>Mutable transformation methods</h3>
571577
<dl class='parameters'>
572578
<dt>double scaleX</dt>
573579
<dd>Multiplier for a non-uniform scale along the x-axis.</dd>
574-
<dt>optional double scaleY</dt>
575-
<dd>Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.</dd>
576-
<dt>optional double scaleZ</dt>
577-
<dd>Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.</dd>
578-
<dt>optional double originX</dt>
579-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
580-
<dt>optional double originY</dt>
581-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
582-
<dt>optional double originZ</dt>
583-
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
580+
<dt>optional double scaleY = 1</dt>
581+
<dd>Multiplier for a non-uniform scale along the y-axis.</dd>
582+
<dt>optional double scaleZ = 1</dt>
583+
<dd>Multiplier for a non-uniform scale along the z-axis.</dd>
584+
<dt>optional double originX = 0</dt>
585+
<dd>Transformation origin on the x-axis.</dd>
586+
<dt>optional double originY = 0</dt>
587+
<dd>Transformation origin on the y-axis.</dd>
588+
<dt>optional double originZ = 0</dt>
589+
<dd>Transformation origin on the z-axis.</dd>
584590
</dl>
585591
Post-multiplies a non-uniform scale transformation on the current matrix with the given origin.
586592
</dd>
@@ -589,10 +595,10 @@ <h3>Mutable transformation methods</h3>
589595
<dl class='parameters'>
590596
<dt>double angle</dt>
591597
<dd>Rotation angle in degrees.</dd>
592-
<dt>optional double originX</dt>
593-
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
594-
<dt>optional double originY</dt>
595-
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
598+
<dt>optional double originX = 0</dt>
599+
<dd>Transformation origin on the x-axis.</dd>
600+
<dt>optional double originY = 0</dt>
601+
<dd>Transformation origin on the y-axis.</dd>
596602
</dl>
597603
Post-multiplies a rotation transformation on the current matrix with the given origin.
598604
</dd>
@@ -678,11 +684,11 @@ <h3>Helper methods</h3>
678684
</dd>
679685
<dt>Float32Array toFloat32Array()</dt>
680686
<dd>
681-
Returns the serialized elements of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]].
687+
Returns the serialized 16 elements <code>m11</code> to <code>m44</code> of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]].
682688
</dd>
683689
<dt>Float64Array toFloat64Array()</dt>
684690
<dd>
685-
Returns the serialized elements of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]].
691+
Returns the serialized 16 elements <code>m11</code> to <code>m44</code> of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]].
686692
</dd>
687693
<dt>DecomposedMatrix decompose()</dt>
688694
<dd>

0 commit comments

Comments
 (0)