diff options
Diffstat (limited to 'tools/lua/dump_clipstack_at_restore.lua')
-rw-r--r-- | tools/lua/dump_clipstack_at_restore.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/lua/dump_clipstack_at_restore.lua b/tools/lua/dump_clipstack_at_restore.lua new file mode 100644 index 0000000000..d53f5a3712 --- /dev/null +++ b/tools/lua/dump_clipstack_at_restore.lua @@ -0,0 +1,25 @@ +function sk_scrape_startcanvas(c, fileName) + canvas = c + clipstack = {} + restoreCount = 0 +end + +function sk_scrape_endcanvas(c, fileName) + canvas = nil +end + +function sk_scrape_accumulate(t) + if (t.verb == "restore") then + restoreCount = restoreCount + 1; + io.write("Clip Stack at restore #", restoreCount, ":\n") + for i = 1, #clipstack do + local element = clipstack[i]; + io.write("\t", element["op"], ", ", element["type"], ", aa:", tostring(element["aa"]), "\n") + end + io.write("\n") + else + clipstack = canvas:getClipStack() + end +end + +function sk_scrape_summarize() end |