Skip to content

createTranslateMatrix

createTranslateMatrix(x, y?): TMat2D

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

Generate a translation matrix

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

See

Parameters

x

number

translation on X axis

y?

number = 0

translation on Y axis

Returns

TMat2D

matrix

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#translate for more details