scale() confusion? SOLVED

can someone explain this behavior?

function setup()
    counter = 0
end
function touched(touch)

end

function draw()
    --print(  )
    background(0, 0, 0, 255 )
    pushMatrix()
    counter = counter + 1
    if( counter > 10 ) then counter = 0 end 
    scale( 1 + counter/10 )
    sprite("Cargo Bot:Command Grab", 200, 200) 
    popMatrix()
end

I can’t figure out why it changes the position like that.

solved it.

you must always translate() and then scale(). not scale() and then translate()

you’ll hit similar when you start putting in rotation as well. Translate then rotate rotates around the origin after translation, rotate then translate rotates on the objects origin, then moves it.