scale
A matrix that scales points from the origin.
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
sx | number | Horizontal factor |
sy | number | Vertical factor, `sx` by default |
Returns
Section titled “Returns”Matrix — The scaling matrix
Examples
Section titled “Examples”Uniform scale
Section titled “Uniform scale”One factor scales both axes.
Flip vertically
Section titled “Flip vertically”A negative factor mirrors the axis.
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):
