Name
TranslateLayer -- translate a layer (V4.7)
Synopsis
TranslateLayer(id, dx, dy)
Function
This command will translate a layer or layer group by the delta offsets specified by dx and dy. A translation means that the layer is moved relative to its current position by the specified offset. Thus, a translation of (100,-100) would move the layer 100 pixels towards the right and 100 pixels towards the top. A translation of (0,0) would not move the layer at all. Translations are very useful for moving layers independent of its current position.

Alternatively, you can also use the TranslateX and TranslateY tags of the powerful SetLayerStyle() command.

Inputs
id
identifier of the layer or layer group to translate
dx
delta x offset (0 means no x translation)
dy
delta y offset (0 means no y translation)
Example
TranslateLayer(1, -50, -50)
The code above moves the first layer 50 pixels in top-left direction.

Show TOC