blob: 3ae08d50dba01a72a7355b35b6efef8bcb6d0708 [file] [log] [blame]
reed@google.com5fdc9832013-07-24 15:47:52 +00001function tostr(t)
2 local str = ""
3 for k, v in next, t do
4 if #str > 0 then
5 str = str .. ", "
6 end
7 if type(k) == "number" then
8 str = str .. "[" .. k .. "] = "
9 else
10 str = str .. tostring(k) .. " = "
11 end
12 if type(v) == "table" then
13 str = str .. "{ " .. tostr(v) .. " }"
14 else
15 str = str .. tostring(v)
16 end
17 end
18 return str
19end
20
21function sk_scrape_startcanvas(c, fileName) end
22
23function sk_scrape_endcanvas(c, fileName) end
24
25function sk_scrape_accumulate(t)
26 local p = t.paint
27 if p then
28 local s = p:getShader()
29 if s then
30 local g = s:asAGradient()
31 if g then
32 io.write(g.type, " gradient with ", g.colorCount, " colors\n")
33 else
34 local b = s:asABitmap()
35 if b then
36 io.write("bitmap ", b.genID, " width=", b.width, " height=", b.height, "\n")
37 end
38 end
39 end
40 end
41end
42
43function sk_scrape_summarize() end
44