OLD | NEW |
1 function sk_scrape_startcanvas(c, fileName) | 1 function sk_scrape_startcanvas(c, fileName) |
2 canvas = c | 2 canvas = c |
3 clipstack = {} | 3 clipstack = {} |
4 restoreCount = 0 | 4 restoreCount = 0 |
5 end | 5 end |
6 | 6 |
7 function sk_scrape_endcanvas(c, fileName) | 7 function sk_scrape_endcanvas(c, fileName) |
8 canvas = nil | 8 canvas = nil |
9 end | 9 end |
10 | 10 |
11 function sk_scrape_accumulate(t) | 11 function sk_scrape_accumulate(t) |
12 if (t.verb == "restore") then | 12 if (t.verb == "restore") then |
13 restoreCount = restoreCount + 1; | 13 restoreCount = restoreCount + 1; |
14 -- io.write("Clip Stack at restore #", restoreCount, ":\n") | 14 io.write("Clip Stack at restore #", restoreCount, ":\n") |
15 io.write("Reduced Clip Stack at restore #", restoreCount, ":\n") | |
16 for i = 1, #clipstack do | 15 for i = 1, #clipstack do |
17 local element = clipstack[i]; | 16 local element = clipstack[i]; |
18 io.write("\t", element["op"], ", ", element["type"], ", aa:", tostri
ng(element["aa"])) | 17 io.write("\t", element["op"], ", ", element["type"], ", aa:", tostri
ng(element["aa"])) |
19 if (element["type"] == "path") then | 18 if (element["type"] == "path") then |
20 io.write(", fill: ", element["path"]:getFillType()) | 19 io.write(", fill: ", element["path"]:getFillType()) |
21 io.write(", segments: \"", element["path"]:getSegmentTypes(), "\
"") | 20 io.write(", segments: \"", element["path"]:getSegmentTypes(), "\
"") |
22 io.write(", convex:", tostring(element["path"]:isConvex())) | 21 io.write(", convex:", tostring(element["path"]:isConvex())) |
23 end | 22 end |
24 io.write("\n") | 23 io.write("\n") |
25 end | 24 end |
26 io.write("\n") | 25 io.write("\n") |
27 else | 26 else |
28 -- clipstack = canvas:getClipStack() | 27 clipstack = canvas:getClipStack() |
29 clipstack = canvas:getReducedClipStack() | |
30 end | 28 end |
31 end | 29 end |
32 | 30 |
33 function sk_scrape_summarize() end | 31 function sk_scrape_summarize() end |
OLD | NEW |