translate( x, y )

This moves the 'original' of the screen, by the number of pixels given. The original is the location which is considered to be at 0x0, which by default is the top left corner of the screen.

Moving the origin will cause all following drawing calls to be moved by that amount.

 * Fills the screen with (blurry) squares.

onEachFrame() do
    fill( :black )
    setColor( :green, 0.3 )
    3.times() do
        translate( -2, -2 )
        getScreenWidth().times( 70 ) do |x|
            getScreenHeight().times( 70 ) do |y|
                translate( x, y )
                fillRect( 0, 0, 65, 65 )

See also

rotate - scale