here's my code:
if (x >= 790) {
x = 800;
canvas.setBounds(1600, 0, 800, 800);
}