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

Side by Side Diff: resources/slides_transitions.lua

Issue 686853005: update slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « resources/slides_content2.lua ('k') | resources/slides_utils.lua » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function scale_text_delta(template, delta) 1 function scale_text_delta(template, delta)
2 template = template.slide 2 template = template.slide
3 for i = 1, #template do 3 for i = 1, #template do
4 local paint = template[i].paint 4 local paint = template[i].paint
5 paint:setTextSize(paint:getTextSize() + delta) 5 paint:setTextSize(paint:getTextSize() + delta)
6 end 6 end
7 end 7 end
8 8
9 function slide_transition(prev, next, is_forward) 9 function slide_transition(prev, next, is_forward)
10 local rec = { 10 local rec = {
(...skipping 21 matching lines...) Expand all
32 rec.step_x = 15 32 rec.step_x = 15
33 rec.isDone = function (self) return self.curr_x >= 0 end 33 rec.isDone = function (self) return self.curr_x >= 0 end
34 end 34 end
35 return rec 35 return rec
36 end 36 end
37 37
38 function sqr(value) return value * value end 38 function sqr(value) return value * value end
39 39
40 function set_blur(paint, alpha) 40 function set_blur(paint, alpha)
41 local sigma = sqr(1 - alpha) * 20 41 local sigma = sqr(1 - alpha) * 20
42 -- paint:setImageFilter(Sk.newBlurImageFilter(sigma, sigma)) 42 if gUseBlurInTransitions then
43 paint:setImageFilter(Sk.newBlurImageFilter(sigma, sigma))
44 end
43 paint:setAlpha(alpha) 45 paint:setAlpha(alpha)
44 end 46 end
45 47
46 function fade_slide_transition(prev, next, is_forward) 48 function fade_slide_transition(prev, next, is_forward)
47 local rec = { 49 local rec = {
48 paint = Sk.newPaint(), 50 paint = Sk.newPaint(),
49 prevDrawable = prev, 51 prevDrawable = prev,
50 nextDrawable = next, 52 nextDrawable = next,
51 proc = function(self, canvas, drawSlideProc) 53 proc = function(self, canvas, drawSlideProc)
52 if self:isDone() then 54 if self:isDone() then
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 end 199 end
198 200
199 gTransitionTable = { 201 gTransitionTable = {
200 fade = fade_transition, 202 fade = fade_transition,
201 slide = slide_transition, 203 slide = slide_transition,
202 fade_slide = fade_slide_transition, 204 fade_slide = fade_slide_transition,
203 rotate = rotate_transition, 205 rotate = rotate_transition,
204 zoom = zoom_transition, 206 zoom = zoom_transition,
205 } 207 }
206 208
OLDNEW
« no previous file with comments | « resources/slides_content2.lua ('k') | resources/slides_utils.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698