Skip to content

createScaleMatrix

createScaleMatrix(x, y?): TMat2D

Defined in: src/util/misc/matrix.ts:200

Generate a scale matrix around the point (0,0)

A matrix in the form of [x 0 0] [0 y 0] [0 0 1]

Parameters

x

number

scale on X axis

y?

number = x

scale on Y axis

Returns

TMat2D

matrix

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#scale