| OLD | NEW |
| 1 function tostr(t) | 1 function tostr(t) |
| 2 local str = "" | 2 local str = "" |
| 3 for k, v in next, t do | 3 for k, v in next, t do |
| 4 if #str > 0 then | 4 if #str > 0 then |
| 5 str = str .. ", " | 5 str = str .. ", " |
| 6 end | 6 end |
| 7 if type(k) == "number" then | 7 if type(k) == "number" then |
| 8 str = str .. "[" .. k .. "] = " | 8 str = str .. "[" .. k .. "] = " |
| 9 else | 9 else |
| 10 str = str .. tostring(k) .. " = " | 10 str = str .. tostring(k) .. " = " |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 total[t.verb] = n + 1 | 52 total[t.verb] = n + 1 |
| 53 | 53 |
| 54 if false and t.verb == "drawRect" and t.paint:isAntiAlias() then | 54 if false and t.verb == "drawRect" and t.paint:isAntiAlias() then |
| 55 local r = t.rect; | 55 local r = t.rect; |
| 56 local p = t.paint; | 56 local p = t.paint; |
| 57 local c = p:getColor(); | 57 local c = p:getColor(); |
| 58 print("drawRect ", tostr(r), tostr(c), "\n") | 58 print("drawRect ", tostr(r), tostr(c), "\n") |
| 59 end | 59 end |
| 60 | 60 |
| 61 if false and t.verb == "drawPath" then | 61 if false and t.verb == "drawPath" then |
| 62 local pred, r1, r2, d1, d2 = t.path:isNestedRects() | 62 local pred, r1, r2, d1, d2 = t.path:isNestedFillRects() |
| 63 | 63 |
| 64 if pred then | 64 if pred then |
| 65 print("drawRect_Nested", tostr(r1), tostr(r2), d1, d2) | 65 print("drawRect_Nested", tostr(r1), tostr(r2), d1, d2) |
| 66 else | 66 else |
| 67 print("drawPath", "isEmpty", tostring(t.path:isEmpty()), | 67 print("drawPath", "isEmpty", tostring(t.path:isEmpty()), |
| 68 "isRect", tostring(t.path:isRect()), tostr(t.path:getBounds(
))) | 68 "isRect", tostring(t.path:isRect()), tostr(t.path:getBounds(
))) |
| 69 end | 69 end |
| 70 end | 70 end |
| 71 end | 71 end |
| 72 | 72 |
| 73 --[[ | 73 --[[ |
| 74 lua_pictures will call this function after all of the pictures have been | 74 lua_pictures will call this function after all of the pictures have been |
| 75 "accumulated". | 75 "accumulated". |
| 76 ]] | 76 ]] |
| 77 function sk_scrape_summarize() | 77 function sk_scrape_summarize() |
| 78 io.write("\n{ ", tostr(total), " }\n") | 78 io.write("\n{ ", tostr(total), " }\n") |
| 79 end | 79 end |
| 80 | 80 |
| OLD | NEW |