multiply
Multiplies matrices, in the mathematical order: the last one applies first. It is the order of
a CSS transform list, so multiply(translate(10, 0), rotate(r)) is
transform: translate(10px) rotate(r): rotate, then translate.
In other words, applyToPoint(multiply(m1, m2), p) equals
applyToPoint(m1, applyToPoint(m2, p)).
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
matrices | readonly Matrix[] | The matrices, outermost first |
Returns
Section titled “Returns”Matrix — Their product, or the identity for none
Examples
Section titled “Examples”Same order as a CSS transform list
Section titled “Same order as a CSS transform list”The last matrix applies first: here, scale then translate.
Scale around a point
Section titled “Scale around a point”Move the point to the origin, scale, move it back.
Related Types
Section titled “Related Types”Matrix
Section titled “Matrix”A 2D affine transformation, in the layout of CSS and SVG matrix(a, b, c, d, e, f):
