Skip to content

Commit ab6d10d

Browse files
dirkschulzesvgeesus
authored andcommitted
scale and scaleBy must be compatible to SVGMatrix. Do not scale m33 as well.
1 parent ecccf54 commit ab6d10d

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

matrix/index.html

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,19 @@ <h3>Immutable transformation methods</h3>
362362
<dt>Matrix scale()</dt>
363363
<dd>
364364
<dl class='parameters'>
365-
<dt>double s</dt>
365+
<dt>double scale</dt>
366+
<dd>Multiplier for a uniform scale transformation.</dd>
367+
<dt>optional double x</dt>
368+
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
369+
<dt>optional double y</dt>
370+
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
371+
</dl>
372+
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.
373+
</dd>
374+
<dt>Matrix scale3d()</dt>
375+
<dd>
376+
<dl class='parameters'>
377+
<dt>double scale</dt>
366378
<dd>Multiplier for a uniform scale transformation.</dd>
367379
<dt>optional double x</dt>
368380
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
@@ -371,7 +383,7 @@ <h3>Immutable transformation methods</h3>
371383
<dt>optional double z</dt>
372384
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
373385
</dl>
374-
Post-multiplies a uniform scale transformation on the current matrix with the given origin and returns the resulting matrix. The current matrix is not modified.
386+
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.
375387
</dd>
376388
<dt>Matrix scaleNonUniform()</dt>
377389
<dd>
@@ -515,6 +527,18 @@ <h3>Mutable transformation methods</h3>
515527
Post-multiplies a translation transformation on the current matrix.
516528
</dd>
517529
<dt>void scaleBy()</dt>
530+
<dd>
531+
<dl class='parameters'>
532+
<dt>double scale</dt>
533+
<dd>Multiplier for a uniform scale transformation.</dd>
534+
<dt>optional double x</dt>
535+
<dd>Transformation origin on the x-axis. Defaulting to 0.</dd>
536+
<dt>optional double y</dt>
537+
<dd>Transformation origin on the y-axis. Defaulting to 0.</dd>
538+
</dl>
539+
Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = scale</code>) on the current matrix with the given origin.
540+
</dd>
541+
<dt>void scale3dBy()</dt>
518542
<dd>
519543
<dl class='parameters'>
520544
<dt>double scale</dt>
@@ -526,7 +550,7 @@ <h3>Mutable transformation methods</h3>
526550
<dt>optional double z</dt>
527551
<dd>Transformation origin on the z-axis. Defaulting to 0.</dd>
528552
</dl>
529-
Post-multiplies a uniform scale transformation on the current matrix with the given origin.
553+
Post-multiplies a uniform 2D scale transformation (<code>m11 = m22 = m33 = scale</code>) on the current matrix with the given origin.
530554
</dd>
531555
<dt>void scaleNonUniformBy()</dt>
532556
<dd>

0 commit comments

Comments
 (0)