Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: resources/slides.lua

Issue 1342523002: json based animation toy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: wip whats next? Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/docs/utilities.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 gShowBounds = false 1 gShowBounds = false
2 gUseBlurInTransitions = false 2 gUseBlurInTransitions = false
3 3
4 gPath = "/skia/trunk/resources/" 4 gPath = "/puregit/resources/"
5 5
6 function load_file(file) 6 function load_file(file)
7 local prev_path = package.path 7 local prev_path = package.path
8 package.path = package.path .. ";" .. gPath .. file .. ".lua" 8 package.path = package.path .. ";" .. gPath .. file .. ".lua"
9 require(file) 9 require(file)
10 package.path = prev_path 10 package.path = prev_path
11 end 11 end
12 12
13 load_file("slides_utils") 13 load_file("slides_utils")
14 14
15 gSlides = parse_file(io.open("/skia/trunk/resources/slides_content2.lua", "r")) 15 gSlides = parse_file(io.open("/puregit/resources/slides_content2.lua", "r"))
16 16
17 function make_rect(l, t, r, b) 17 function make_rect(l, t, r, b)
18 return { left = l, top = t, right = r, bottom = b } 18 return { left = l, top = t, right = r, bottom = b }
19 end 19 end
20 20
21 function make_paint(typefacename, stylebits, size, color) 21 function make_paint(typefacename, stylebits, size, color)
22 local paint = Sk.newPaint(); 22 local paint = Sk.newPaint();
23 paint:setAntiAlias(true) 23 paint:setAntiAlias(true)
24 paint:setSubpixelText(true) 24 paint:setSubpixelText(true)
25 paint:setTypeface(Sk.newTypeface(typefacename, stylebits)) 25 paint:setTypeface(Sk.newTypeface(typefacename, stylebits))
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 function onCharHandler(uni) 347 function onCharHandler(uni)
348 local proc = keyProcs[uni] 348 local proc = keyProcs[uni]
349 if proc then 349 if proc then
350 proc() 350 proc()
351 return true 351 return true
352 end 352 end
353 return false 353 return false
354 end 354 end
OLDNEW
« no previous file with comments | « experimental/docs/utilities.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698