Skip to content

Commit 5c89c4d

Browse files
dirkschulzesvgeesus
authored andcommitted
Merge pull request #318 from w3c/fix-214
[geometry-1] Re-add scaleNonUniform for compat reasons to SVGMatrix. …
1 parent 85b4a9b commit 5c89c4d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

geometry/Overview.bs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ interface DOMMatrixReadOnly {
719719
optional unrestricted double originX = 0,
720720
optional unrestricted double originY = 0,
721721
optional unrestricted double originZ = 0);
722+
[NewObject] DOMMatrix scaleNonUniform(optional unrestricted double scaleX = 1,
723+
optional unrestricted double scaleY = 1);
722724
[NewObject] DOMMatrix scale3d(optional unrestricted double scale = 1,
723725
optional unrestricted double originX = 0,
724726
optional unrestricted double originY = 0,
@@ -1331,6 +1333,21 @@ export>is 2D</dfn>. This flag indicates that:
13311333

13321334
<p>The current matrix is not modified.
13331335

1336+
<dt><dfn>scaleNonUniform(<var>scaleX</var>, <var>scaleY</var>)</dfn>
1337+
<dd>
1338+
<p class=note>Supported for legacy reasons to be compatible with {{SVGMatrix}} as defined in SVG 1.1 [[SVG11]]. Authors are encouraged to use {{scale()}} instead.
1339+
<ol>
1340+
<li><p>Let <var>result</var> be the resulting matrix initialized to the values of the current
1341+
matrix.
1342+
1343+
<li><p>Perform a {{DOMMatrix/scaleSelf()}} transformation on <var>result</var> with the arguments
1344+
<var>scaleX</var>, <var>scaleY</var>, <i>1</i>, <i>0</i>,
1345+
<i>0</i>, <i>0</i>.
1346+
1347+
<li><p>Return <var>result</var>.
1348+
</ol>
1349+
1350+
<p>The current matrix is not modified.
13341351
<dt><dfn>scale3d(<var>scale</var>, <var>originX</var>, <var>originY</var>, <var>originZ</var>)</dfn>
13351352
<dd>
13361353
<ol>
@@ -2178,7 +2195,8 @@ href="https://www.w3.org/TR/2014/WD-geometry-1-20140918/">18 September 2014 Work
21782195

21792196
<li><p>Changed the {{DOMMatrixReadOnly/scale()}} and {{DOMMatrix/scaleSelf()}} methods to be more
21802197
like the previous <code>scaleNonUniform()</code>/<code>scaleNonUniformSelf()</code> methods,
2181-
and dropped the <code>scaleNonUniform*</code> methods.
2198+
and dropped the <code>scaleNonUniformSelf()</code> method. Keep support for <code>scaleNonUniform()</code>
2199+
for legacy reasons.
21822200

21832201
<li><p>Made all arguments optional for {{DOMMatrix}}/{{DOMMatrixReadOnly}} methods, except for
21842202
{{DOMMatrix/setMatrixValue()}}.

0 commit comments

Comments
 (0)