2014-02-24 18:59:48 +00:00
|
|
|
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;
|
2014-02-26 20:22:32 +00:00
|
|
|
-- io.write("Clip Stack at restore #", restoreCount, ":\n")
|
|
|
|
io.write("Reduced Clip Stack at restore #", restoreCount, ":\n")
|
2014-02-24 18:59:48 +00:00
|
|
|
for i = 1, #clipstack do
|
|
|
|
local element = clipstack[i];
|
2014-02-24 21:59:29 +00:00
|
|
|
io.write("\t", element["op"], ", ", element["type"], ", aa:", tostring(element["aa"]))
|
|
|
|
if (element["type"] == "path") then
|
|
|
|
io.write(", fill: ", element["path"]:getFillType())
|
|
|
|
io.write(", segments: \"", element["path"]:getSegmentTypes(), "\"")
|
|
|
|
io.write(", convex:", tostring(element["path"]:isConvex()))
|
|
|
|
end
|
|
|
|
io.write("\n")
|
2014-02-24 18:59:48 +00:00
|
|
|
end
|
|
|
|
io.write("\n")
|
|
|
|
else
|
2014-02-26 20:22:32 +00:00
|
|
|
-- clipstack = canvas:getClipStack()
|
|
|
|
clipstack = canvas:getReducedClipStack()
|
2014-02-24 18:59:48 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function sk_scrape_summarize() end
|