Home | History | Annotate | Download | only in lua
      1 function sk_scrape_startcanvas(c, fileName)
      2     canvas = c
      3     clipstack = {}
      4     restoreCount = 0
      5 end
      6 
      7 function sk_scrape_endcanvas(c, fileName)
      8     canvas = nil
      9 end
     10 
     11 function sk_scrape_accumulate(t)
     12     if (t.verb == "restore") then
     13         restoreCount = restoreCount + 1;
     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
     17             local element = clipstack[i];
     18             io.write("\t", element["op"], ", ", element["type"], ", aa:", tostring(element["aa"]))
     19             if (element["type"] == "path") then
     20                 io.write(", fill: ", element["path"]:getFillType())
     21                 io.write(", segments: \"", element["path"]:getSegmentTypes(), "\"")
     22                 io.write(", convex:", tostring(element["path"]:isConvex()))
     23             end
     24             io.write("\n")
     25         end
     26         io.write("\n")
     27     else
     28         -- clipstack = canvas:getClipStack()
     29         clipstack = canvas:getReducedClipStack()
     30     end
     31 end
     32 
     33 function sk_scrape_summarize() end
     34