currentAction.type = AT_ZoomPx;
return;
}
+ else if (actionType == "gpu")
+ {
+ currentAction.type = AT_SetGPURendering;
+ return;
+ }
+ else if (actionType == "cpu")
+ {
+ currentAction.type = AT_SetCPURendering;
+ return;
+ }
+ else if (actionType == "lazy")
+ {
+ currentAction.type = AT_EnableLazyRendering;
+ return;
+ }
+ else if (actionType == "nolazy")
+ {
+ currentAction.type = AT_DisableLazyRendering;
+ return;
+ }
else if (actionType == "quit")
{
currentAction.type = AT_Quit;
case AT_ZoomPx:
view->ScaleAroundPoint(Real(currentAction.ix)/Real(scr->ViewportWidth()),Real(currentAction.iy)/Real(scr->ViewportHeight()), Real(expf(-currentAction.iz/20.f)));
break;
+ case AT_SetGPURendering:
+ view->SetGPURendering(true);
+ break;
+ case AT_SetCPURendering:
+ view->SetGPURendering(false);
+ break;
+ case AT_EnableLazyRendering:
+ view->SetLazyRendering(true);
+ break;
+ case AT_DisableLazyRendering:
+ view->SetLazyRendering(false);
+ break;
default:
Fatal("Unknown script command in queue.");
}
# Test script for IPDF automation.
-loop 1000 pxzoom 400 300 1
+gpu
+nolazy
+loop 50 pxzoom 400 300 1
translate 10.0 -3.0
loop 100 wait
-loop 1000 zoom 0.5 0.5 0.95
+cpu
+lazy
+loop 90 zoom 0.5 0.5 1.05
quit