translate
A matrix that moves points by (tx, ty).
Available since v3.1.5
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
tx | number | Horizontal offset |
ty | number | Vertical offset |
Returns
Section titled “Returns”Matrix — The translation matrix
Examples
Section titled “Examples”Move a point
Section titled “Move a point”e and f hold the offset.
Negative offsets
Section titled “Negative offsets”Move up and to the left.
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):
