ctx.save(); ctx.fillStyle = "green"; ctx.fillRect(10, 10, 100, 100); ctx.restore(); ctx.fillRect(150, 75, 100, 100);