# HG changeset patch # User Dirk Schulze # Date 1363322478 25200 # Node ID 5a64938d0a49425499fc2ea802c9a34cd3ec92e9 # Parent 6546f6ccd054b55656cbac374a26952dd0a6036e Incorporate feedback from Robert O'Callahan. diff -r 6546f6ccd054 -r 5a64938d0a49 matrix/ChangeLog --- a/matrix/ChangeLog Thu Mar 14 12:51:14 2013 -0700 +++ b/matrix/ChangeLog Thu Mar 14 21:41:18 2013 -0700 @@ -1,3 +1,7 @@ +2013-03-13 Dirk Schulze + Incorporate feedback from Robert O'Callahan. + http://lists.w3.org/Archives/Public/public-fx/2013JanMar/0128.html + 2013-03-11 Dirk Schulze Add Conformance section. diff -r 6546f6ccd054 -r 5a64938d0a49 matrix/index.html --- a/matrix/index.html Thu Mar 14 12:51:14 2013 -0700 +++ b/matrix/index.html Thu Mar 14 21:41:18 2013 -0700 @@ -118,6 +118,8 @@ +

Define initial values.

+

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.

@@ -160,6 +162,7 @@

Should it be postponed to avoid CSS3 Transforms dependency?

Should unit-less values (like for SVG transform presentation attribute) be allowed too? "translate(20,20)"

+

Throws a DOMException with name SyntaxError if the DOMString parameter does not validate to a transform list [[!CSS3-TRANSFORMS]].

Constructor()
@@ -185,6 +188,7 @@ Create an identity matrix first. An Float32array [[!TYPED-ARRAYS]] of 6 items sets the element values a to f. An array of 16 items sets the element values m11 to m44.
+

Throws a DOMException with name SyntaxError if the Float32array parameter does not consist of 6 or 16 items.

Constructor()
@@ -194,6 +198,7 @@ Create an identity matrix first. An Float64array [[!TYPED-ARRAYS]] of 6 items sets the element values a to f. An array of 16 items sets the element values m11 to m44.
+

Throws a DOMException with name SyntaxError if the Float64array parameter does not consist of 6 or 16 items.

Constructor()
@@ -203,6 +208,7 @@ Create an identity matrix first. A sequence of 6 items sets the element values a to f. A sequence of 16 items sets the element values m11 to m44.
+

Throws a DOMException with name SyntaxError if the number sequence parameter does not consist of 6 or 16 items. @@ -210,7 +216,7 @@

Two-dimensional attributes

- If a Matrix just consists of 2D transformations the 6 values a to f can represent the transformation matrix. If the Matrix object is immutable, a DOMException of type NoModificationAllowedError must be thrown on setting the attributes. + If a Matrix just consists of 2D transformations the 6 values a to f can represent the transformation matrix. If the Matrix object is immutable, a DOMException with name NoModificationAllowedError must be thrown on setting the attributes.

@@ -251,7 +257,7 @@

Three-dimensional attributes

- The following attributes m11 to m44 represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the Matrix object is immutable, a DOMException of type NoModificationAllowedError must be thrown on setting the attributes. + The following attributes m11 to m44 represent the elements of the 4x4 matrix. The coordinates are in column-major order. If the Matrix object is immutable, a DOMException with name NoModificationAllowedError must be thrown on setting the attributes.

@@ -381,10 +387,10 @@
double scale
Multiplier for a uniform scale transformation.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
Post-multiplies a uniform 2D scale transformation (m11 = m22 = scale) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. @@ -393,12 +399,12 @@
double scale
Multiplier for a uniform scale transformation.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
-
optional double originZ
-
Transformation origin on the z-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
+
optional double originZ = 0
+
Transformation origin on the z-axis.
Post-multiplies a uniform scale transformation (m11 = m22 = m33 = scale) on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. @@ -407,16 +413,16 @@
double scaleX
Multiplier for a non-uniform scale along the x-axis.
-
optional double scaleY
-
Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.
-
optional double scaleZ
-
Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
-
optional double originZ
-
Transformation origin on the z-axis. Defaulting to 0.
+
optional double scaleY = 1
+
Multiplier for a non-uniform scale along the y-axis.
+
optional double scaleZ = 1
+
Multiplier for a non-uniform scale along the z-axis.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
+
optional double originZ = 0
+
Transformation origin on the z-axis.
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. @@ -425,10 +431,10 @@
double angle
Rotation angle in degrees.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
Post-multiplies a rotation transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified. @@ -506,7 +512,7 @@

Mutable transformation methods

- The following methods do modify the current matrix. If the Matrix object is immutable, a DOMException of type NoModificationAllowedError must be thrown on calling the operations below. + The following methods do modify the current matrix. If the Matrix object is immutable, a DOMException with name NoModificationAllowedError must be thrown on calling the operations below.

@@ -545,10 +551,10 @@
double scale
Multiplier for a uniform scale transformation.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
Post-multiplies a uniform 2D scale transformation (m11 = m22 = scale) on the current matrix with the given origin. @@ -557,12 +563,12 @@
double scale
Multiplier for a uniform scale transformation.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
-
optional double originZ
-
Transformation origin on the z-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
+
optional double originZ = 0
+
Transformation origin on the z-axis.
Post-multiplies a uniform 2D scale transformation (m11 = m22 = m33 = scale) on the current matrix with the given origin. @@ -571,16 +577,16 @@
double scaleX
Multiplier for a non-uniform scale along the x-axis.
-
optional double scaleY
-
Multiplier for a non-uniform scale along the y-axis. Defaulting to 1.
-
optional double scaleZ
-
Multiplier for a non-uniform scale along the z-axis. Defaulting to 1.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
-
optional double originZ
-
Transformation origin on the z-axis. Defaulting to 0.
+
optional double scaleY = 1
+
Multiplier for a non-uniform scale along the y-axis.
+
optional double scaleZ = 1
+
Multiplier for a non-uniform scale along the z-axis.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
+
optional double originZ = 0
+
Transformation origin on the z-axis.
Post-multiplies a non-uniform scale transformation on the current matrix with the given origin. @@ -589,10 +595,10 @@
double angle
Rotation angle in degrees.
-
optional double originX
-
Transformation origin on the x-axis. Defaulting to 0.
-
optional double originY
-
Transformation origin on the y-axis. Defaulting to 0.
+
optional double originX = 0
+
Transformation origin on the x-axis.
+
optional double originY = 0
+
Transformation origin on the y-axis.
Post-multiplies a rotation transformation on the current matrix with the given origin. @@ -678,11 +684,11 @@
Float32Array toFloat32Array()
- Returns the serialized elements of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]]. + Returns the serialized 16 elements m11 to m44 of the current matrix in column-major order as Float32Array [[!TYPED-ARRAYS]].
Float64Array toFloat64Array()
- Returns the serialized elements of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]]. + Returns the serialized 16 elements m11 to m44 of the current matrix in column-major order as Float64Array [[!TYPED-ARRAYS]].
DecomposedMatrix decompose()