X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fdebugscript.h;h=ae2c8eb4cc3790736626c710cd638d2d3d37567c;hb=f73ce73b9cec7f1e2c265b3cbcc7bca9c4011d11;hp=d39807d15731a9bf17086acdb83a3776c4ab7ce5;hpb=67539822c80c8057d850b542abc142c189bd3f05;p=ipdf%2Fcode.git diff --git a/src/debugscript.h b/src/debugscript.h index d39807d..ae2c8eb 100644 --- a/src/debugscript.h +++ b/src/debugscript.h @@ -13,12 +13,9 @@ namespace IPDF class DebugScript { public: - DebugScript() : inp(), currentAction(), m_actions(), m_labels(), m_index(0) {} + DebugScript(std::istream * in) : m_input(in), currentAction(), m_actions(), m_labels(), m_index(0) {} virtual ~DebugScript() {} - void Load(const char *filename) - { - inp.open(filename); - } + bool Execute(View *view, Screen *scr); private: enum ActionType @@ -41,6 +38,11 @@ private: AT_PrintPerformance, AT_RecordPerformance, AT_DebugFont, + AT_ApproachBoundsZeno, + AT_ApproachBoundsLinear, + AT_SetBounds, + AT_QueryGPUBounds, // query bounds of Beziers when transformed to GPU + AT_ScreenShot, // take screenshot AT_Quit }; @@ -52,11 +54,12 @@ private: Real z; int iz; int loops; + Real w, h; std::string textargs; Action() : type(AT_WaitFrame), x(0), y(0), ix(0), iy(0), z(0), loops(0), textargs("") {} }; - std::ifstream inp; + std::istream * m_input; Action currentAction; std::vector m_actions; @@ -67,7 +70,7 @@ private: { clock_t clock; unsigned object_count; - Rect view_bounds; + VRect view_bounds; }; PerformanceData m_perf_start; @@ -76,7 +79,7 @@ private: void PrintPerformance(View * view, Screen * scr); void ClearPerformance(View * view, Screen * scr); - void ParseAction(); + void ParseAction(View * view, Screen * scr); }; }