Skip to main content

translate

translate() 

Translates the transformation matrix by the given vector or dictionary.

// Outer rect
rect((0, 0), (2, 2))
// Inner rect
translate(x: .5, y: .5)
rect((0, 0), (1, 1))

..args:

โ€‹

A single vector or any combination of the named arguments x, y and z to translate by. A translation matrix with the given offsets gets multiplied with the current transformation depending on the value of pre.

Specify matrix multiplication order - false: World = World * Translate - true: World = Translate * World