Name
TranslateLayer -- translate a layer (V4.7)
Synopsis
TranslateLayer(id, dx, dy)
Function
This command will translate a layer by the specified delta x and delta y offsets. 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 quick moves without having to use absolute coordinates.

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

Inputs
id
identifier of the layer 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