+ }
+ case AT_Label:
+ m_labels[currentAction.textargs] = m_index;
+ currentAction.type = AT_WaitFrame;
+ currentAction.loops = 1;
+ break;
+ case AT_Goto:
+ m_index = m_labels[currentAction.textargs];
+ currentAction.loops = 1;
+ break;
+ case AT_Debug:
+ Debug("View bounds: %s", view->GetBounds().Str().c_str());
+ if (currentAction.textargs.size() > 0)
+ Debug("%s", currentAction.textargs.c_str());
+ break;
+ case AT_ClearDocument:
+ view->Doc().ClearObjects();
+ currentAction.loops = 1;
+ break;
+ case AT_ClearPerformance:
+ ClearPerformance(view, scr);
+ currentAction.loops = 1;
+ break;
+ case AT_PrintPerformance:
+ PrintPerformance(view, scr);
+ currentAction.loops = 1;
+ break;
+ case AT_RecordPerformance:
+ PrintPerformance(view, scr);
+ break;
+ case AT_DebugFont:
+ scr->ShowDebugFont(currentAction.textargs == "1" || currentAction.textargs == "on");
+ currentAction.loops = 1;
+ break;
+
+ case AT_ApproachBoundsZeno:
+ {
+ VRect target(currentAction.x, currentAction.y, currentAction.w, currentAction.h);
+ if (currentAction.z != VReal(1))
+ {
+ target.x = view->GetBounds().x + (target.x-view->GetBounds().x)/VReal(currentAction.z);
+ target.y = view->GetBounds().y + (target.y-view->GetBounds().y)/VReal(currentAction.z);
+ target.w = view->GetBounds().w + (target.w-view->GetBounds().w)/VReal(currentAction.z);
+ target.h = view->GetBounds().h + (target.h-view->GetBounds().h)/VReal(currentAction.z);
+ }
+
+
+ VReal s = target.w/(view->GetBounds().w);
+ if (Real(s) != 1)
+ {
+ VReal x0;
+ VReal y0;
+ x0 = (view->GetBounds().x - target.x)/((s - VReal(1))*view->GetBounds().w);
+ y0 = (view->GetBounds().y - target.y)/((s - VReal(1))*view->GetBounds().h);
+ view->ScaleAroundPoint(x0, y0, s);
+ currentAction.loops++;
+ }
+ else
+ {
+ Debug("Already at target view; Waiting for remaining %d frames", currentAction.loops);
+ currentAction.type = AT_WaitFrame;
+ }
+ break;
+ }
+ case AT_ApproachBoundsLinear:
+ {
+ VRect target(currentAction.x, currentAction.y, currentAction.w, currentAction.h);
+ target.x += view->GetBounds().x;
+ target.y += view->GetBounds().y;
+ target.w += view->GetBounds().w;
+ target.h += view->GetBounds().h;
+ VReal s = target.w/(view->GetBounds().w);
+ if (Real(s) != 1)
+ {
+ VReal x0;
+ VReal y0;
+ x0 = (view->GetBounds().x - target.x)/((s - VReal(1))*view->GetBounds().w);
+ y0 = (view->GetBounds().y - target.y)/((s - VReal(1))*view->GetBounds().h);
+ view->ScaleAroundPoint(x0, y0, s);
+ currentAction.loops++;
+ }
+ else
+ {
+ Debug("Already at target view; Waiting for remaining %d frames", currentAction.loops);
+ currentAction.type = AT_WaitFrame;
+ }
+ break;
+ }
+ case AT_SetBounds:
+ {
+ VRect target(currentAction.x, currentAction.y, currentAction.w, currentAction.h);
+ view->SetBounds(target);
+ break;
+ }
+
+ case AT_QueryGPUBounds:
+ {
+ view->QueryGPUBounds(currentAction.textargs.c_str(), "w");
+ currentAction.loops = 1;
+ break;
+ }
+ case AT_ScreenShot:
+ {
+ view->SaveBMP(currentAction.textargs.c_str());
+ currentAction.loops = 1;
+ break;
+ }