1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

Reference | translate()


Syntax
translate(x, y)

DescriptionSpecifies the amount to move a subsequent shape, path, text, image on the screen. The first parameter sets the horizontal offset, the second parameter the vertical offset. Translating is the same as dragging something across the screen. Or the same as moving the canvas registration point, which is situated in the upper left corner by default. Once called, all commands following translate() are repositioned, which makes translate() useful for positioning whole compositions of multiple elements.
Tutorial Graphics State


Example
fill(0.2)
oval(-10, -10, 40, 40)
translate(50, 50)
oval(-10, -10, 40, 40)