Merge branch 'devel/master' into tizen
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 28 Nov 2018 05:23:12 +0000 (14:23 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Wed, 28 Nov 2018 05:23:12 +0000 (14:23 +0900)
43 files changed:
automated-tests/resources/insta_camera.json [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/toolkit-text-utils.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-Visuals-internal.cpp
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit/utc-Dali-Layouting.cpp
automated-tests/src/dali-toolkit/utc-Dali-LayoutingAnimation.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/devel-api/file.list
dali-toolkit/devel-api/layouting/layout-group-impl.cpp
dali-toolkit/devel-api/layouting/layout-group-impl.h
dali-toolkit/devel-api/layouting/layout-item-impl.cpp
dali-toolkit/devel-api/layouting/layout-parent-impl.h
dali-toolkit/devel-api/layouting/layout-transition-data.h
dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/visuals/visual-properties-devel.h
dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/file.list
dali-toolkit/internal/layouting/layout-controller-impl.cpp
dali-toolkit/internal/layouting/layout-controller-impl.h
dali-toolkit/internal/layouting/layout-transition-data-impl.cpp
dali-toolkit/internal/layouting/layout-transition-data-impl.h
dali-toolkit/internal/text/layouts/layout-engine.cpp
dali-toolkit/internal/text/layouts/layout-engine.h
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp [new file with mode: 0644]
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h [new file with mode: 0644]
dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.cpp [new file with mode: 0644]
dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.h [new file with mode: 0644]
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/visual-string-constants.cpp
dali-toolkit/internal/visuals/visual-url.cpp
dali-toolkit/internal/visuals/visual-url.h
dali-toolkit/public-api/dali-toolkit-version.cpp
docs/content/main.md
docs/content/programming-guide/viewing-modes.h [deleted file]
node-addon/dali-addon.cpp
packaging/dali-toolkit.spec

diff --git a/automated-tests/resources/insta_camera.json b/automated-tests/resources/insta_camera.json
new file mode 100644 (file)
index 0000000..945c3b2
--- /dev/null
@@ -0,0 +1 @@
+{"v":"5.0.1","fr":30.0000305175781,"ip":0,"op":124.000126139323,"w":800,"h":600,"nm":"Camera_003_render","ddd":0,"assets":[{"id":"comp_4","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"flash ring","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[133,-67,0],"ix":2},"a":{"a":0,"k":[74,-135,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.09,0.09],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p09_1_0p167_0p167","0p09_1_0p167_0p167"],"t":73,"s":[0,0],"e":[148,148]},{"t":79.0000803629557}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.09],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p09_1_0p167_0p167"],"t":73,"s":[23],"e":[0]},{"t":82.0000834147135}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[74,-135],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":73.0000742594401,"op":83.0000844319661,"st":73.0000742594401,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"button lines","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-35.5,-60.5,0],"ix":2},"a":{"a":0,"k":[72.5,-149.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[91,-152.25],[108,-160.75]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 5","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[60.25,-161.75],[49,-177.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4.25,2.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 6","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[73.75,-162.5],[80.75,-179]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[4.25,2.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 4","np":3,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[53,-150.5],[34.25,-159.5]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":2,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":3,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.08],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p08_1_0p167_0p167"],"t":73.539,"s":[0],"e":[100]},{"t":80.0000813802083}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.08],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p08_1_0p167_0p167"],"t":71,"s":[0],"e":[100]},{"t":80.0000813802083}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":5,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":71.0000722249349,"op":81.0000823974609,"st":71.0000722249349,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"flash light","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[35.264],"e":[102.264]},{"t":80.0000813802083}],"ix":10},"p":{"a":0,"k":[132,-68,0],"ix":2},"a":{"a":0,"k":[-340,-162,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":4,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":143.286,"ix":5},"ir":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[0],"e":[25]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":76,"s":[25],"e":[0]},{"t":80.0000813802083}],"ix":6},"is":{"a":0,"k":193,"ix":8},"or":{"a":0,"k":73.6,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156862745,1,0.988235294118,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-340,-162],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":71.0000722249349,"op":81.0000823974609,"st":71.0000722249349,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"face button mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"face button","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":89.999,"ix":10},"p":{"a":0,"k":[34.724,96.498,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.35,0.35],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p35_1_0p54_0","0p35_1_0p54_0"],"t":28,"s":[0,0],"e":[32,32]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":48,"s":[32,32],"e":[32,32]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.53,0.53],"y":[0,0]},"n":["0p833_0p833_0p53_0","0p833_0p833_0p53_0"],"t":97,"s":[32,32],"e":[105,105]},{"t":135.000137329102}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":28.0000284830729,"op":124.000126139323,"st":28.0000284830729,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"line mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"line","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.084,"ix":10},"p":{"a":0,"k":[68.999,-5.896,0],"ix":2},"a":{"a":0,"k":[0.5,-56,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-171.5,-56],[165.5,-56]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.59],"y":[1]},"o":{"x":[0.29],"y":[0]},"n":["0p59_1_0p29_0"],"t":16,"s":[50],"e":[0]},{"t":33.0000335693359}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.59],"y":[1]},"o":{"x":[0.29],"y":[0]},"n":["0p59_1_0p29_0"],"t":16,"s":[50],"e":[100]},{"t":33.0000335693359}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":16.0000162760417,"op":124.000126139323,"st":16.0000162760417,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"flash mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"button","parent":20,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":29,"s":[70.511],"e":[102.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":47,"s":[102.512],"e":[102.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[102.512],"e":[92.512]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":74,"s":[92.512],"e":[102.512]},{"i":{"x":[0.823],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p823_1_0p167_0"],"t":77,"s":[102.512],"e":[102.512]},{"i":{"x":[0.745],"y":[1]},"o":{"x":[1],"y":[-0.47]},"n":["0p745_1_1_-0p47"],"t":93,"s":[102.512],"e":[72.512]},{"t":105.000106811523}],"ix":3,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('X Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('X Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('X Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"y":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":29,"s":[-176.891],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":47,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":71,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":74,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":77,"s":[-176.421],"e":[-176.421]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":93,"s":[-176.421],"e":[-176.421]},{"t":105.000106811523}],"ix":4}},"a":{"a":0,"k":[94,-107.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"X Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[26,86],"ix":2},"p":{"a":0,"k":[74,24],"ix":3},"r":{"a":0,"k":24,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[94,-107.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":29.0000295003255,"op":106.000107828776,"st":29.0000295003255,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"body mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":0,"k":[-2,-6.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p14_1_0p54_0","0p14_1_0p54_0"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"t":17.0000172932943}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.929412004059,0.929412004059,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"flash","parent":20,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27,"s":[71.498],"e":[129.499]},{"i":{"x":[0.885],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p885_1_0p167_0"],"t":39,"s":[129.499],"e":[129.499]},{"i":{"x":[0.683],"y":[1]},"o":{"x":[0.688],"y":[-0.339]},"n":["0p683_1_0p688_-0p339"],"t":99,"s":[129.499],"e":[69.499]},{"t":110.000111897786}],"ix":3,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('X Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('X Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('X Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"y":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.59],"y":[0]},"n":["0p833_0p833_0p59_0"],"t":27,"s":[-6.965],"e":[-6.42]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":39,"s":[-6.42],"e":[-6.42]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":99,"s":[-6.42],"e":[-6.42]},{"t":110.000111897786}],"ix":4,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Y Position - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Y Position - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Y Position - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"}},"a":{"a":0,"k":[94,-107.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Y Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Y Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Y Position - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Overshoot","np":3,"mn":"ADBE Slider Control","ix":4,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Bounce","np":3,"mn":"ADBE Slider Control","ix":5,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"X Position - Friction","np":3,"mn":"ADBE Slider Control","ix":6,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[79,72.861],"ix":2},"p":{"a":0,"k":[72,22],"ix":3},"r":{"a":0,"k":9,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[94,-107.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":27.0000274658203,"op":107.000108846029,"st":27.0000274658203,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"lens mask 2","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"lens","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[-22,-28.5,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Size - Ellipse Path 1 - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p833_0p833_0p54_0","0p833_0p833_0p54_0"],"t":21,"s":[0,0],"e":[94,94]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":41,"s":[94,94],"e":[94,94]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.87,0.87],"y":[0,0]},"n":["0p833_0p833_0p87_0","0p833_0p833_0p87_0"],"t":97,"s":[94,94],"e":[183,183]},{"t":123.00012512207}],"ix":2,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Size - Ellipse Path 1 - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Size - Ellipse Path 1 - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Size - Ellipse Path 1 - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":21.0000213623047,"op":124.000126139323,"st":21.0000213623047,"bm":0},{"ddd":0,"ind":16,"ty":4,"nm":"lens mask","parent":19,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p833_0p833_0p167_0p167","0p833_0p833_0p167_0p167"],"t":101,"s":[216,302],"e":[0,302]},{"t":110.000111897786}],"ix":2,"x":"var $bm_rt;\n$bm_rt = thisComp.layer('body').content('Rectangle 1').content('Rectangle Path 1').size;"},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.204152006261,0.019608000213,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":17,"ty":4,"nm":"lens","parent":20,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[-22,-28.5,0],"ix":2},"a":{"a":0,"k":[3,4,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Size - Ellipse Path 1 - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Size - Ellipse Path 1 - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":100,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.54,0.54],"y":[0,0]},"n":["0p833_0p833_0p54_0","0p833_0p833_0p54_0"],"t":15,"s":[0,0],"e":[136,136]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":35,"s":[136,136],"e":[136,136]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.87,0.87],"y":[0,0]},"n":["0p833_0p833_0p87_0","0p833_0p833_0p87_0"],"t":97,"s":[136,136],"e":[212,212]},{"t":123.00012512207}],"ix":2,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Size - Ellipse Path 1 - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Size - Ellipse Path 1 - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Size - Ellipse Path 1 - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":15.0000152587891,"op":124.000126139323,"st":15.0000152587891,"bm":0},{"ddd":0,"ind":18,"ty":4,"nm":".gannon-gram","cl":"gannon-gram","parent":20,"sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":90.004,"ix":10},"p":{"a":0,"k":[85.672,-6.451,0],"ix":2},"a":{"a":0,"k":[-0.257,-6.362,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.887],[-4.517,0],[-1.575,1.76],[0,0],[0,0],[0,0],[0,0],[0,0],[1.413,0],[0,2.919],[-2.803,0],[-0.718,-1.089],[0,0],[3.196,0]],"o":[[0,4.864],[2.803,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.672,0.602],[-2.803,0],[0,-2.919],[1.621,0],[0,0],[-1.181,-1.83],[-4.517,0]],"v":[[-101.849,-7.713],[-93.626,0.301],[-87.048,-2.617],[-87.048,-8.524],[-94.414,-8.524],[-94.414,-5.698],[-90.291,-5.698],[-90.291,-3.822],[-93.626,-2.641],[-98.467,-7.713],[-93.626,-12.786],[-89.966,-10.84],[-87.233,-12.323],[-93.626,-15.704]],"c":true},"ix":2},"nm":"G","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"G","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-69.614,0],[-66.024,0],[-71.976,-15.45],[-76.099,-15.45],[-82.075,0],[-78.462,0],[-77.489,-2.664],[-70.587,-2.664]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-74.038,-12.601],[-71.49,-5.513],[-76.609,-5.513]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"A","np":5,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-49.766,0],[-46.593,0],[-46.593,-15.45],[-49.882,-15.45],[-49.882,-5.443],[-57.039,-15.45],[-60.421,-15.45],[-60.421,0],[-57.132,0],[-57.132,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-28.721,0],[-25.548,0],[-25.548,-15.45],[-28.837,-15.45],[-28.837,-5.443],[-35.995,-15.45],[-39.376,-15.45],[-39.376,0],[-36.087,0],[-36.087,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.656],[-4.656,0],[0,4.656],[4.679,0]],"o":[[0,4.656],[4.679,0],[0,-4.656],[-4.656,0]],"v":[[-19.073,-7.713],[-11.012,0.278],[-2.928,-7.713],[-11.012,-15.704]],"c":true},"ix":2},"nm":"O","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,-2.895],[2.849,0],[0,2.872],[-2.849,0]],"o":[[0,2.872],[-2.849,0],[0,-2.895],[2.849,0]],"v":[[-6.31,-7.713],[-11.012,-2.641],[-15.691,-7.713],[-11.012,-12.786]],"c":true},"ix":2},"nm":"O","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"O","np":5,"cix":2,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[14.196,0],[17.37,0],[17.37,-15.45],[14.081,-15.45],[14.081,-5.443],[6.923,-15.45],[3.541,-15.45],[3.541,0],[6.831,0],[6.831,-10.377]],"c":true},"ix":2},"nm":"N","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"N","np":3,"cix":2,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-4.887],[-4.517,0],[-1.575,1.76],[0,0],[0,0],[0,0],[0,0],[0,0],[1.413,0],[0,2.919],[-2.803,0],[-0.718,-1.089],[0,0],[3.196,0]],"o":[[0,4.864],[2.803,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.672,0.602],[-2.803,0],[0,-2.919],[1.621,0],[0,0],[-1.181,-1.83],[-4.517,0]],"v":[[23.845,-7.713],[32.068,0.301],[38.646,-2.617],[38.646,-8.524],[31.28,-8.524],[31.28,-5.698],[35.403,-5.698],[35.403,-3.822],[32.068,-2.641],[27.227,-7.713],[32.068,-12.786],[35.727,-10.84],[38.461,-12.323],[32.068,-15.704]],"c":true},"ix":2},"nm":"G","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"G","np":3,"cix":2,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,2.733],[3.22,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[1.668,-0.394],[0,-2.872],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[54.156,0],[57.932,0],[54.457,-5.883],[57.839,-10.47],[52.651,-15.45],[45.424,-15.45],[45.424,0],[48.713,0],[48.713,-5.536],[51.122,-5.536]],"c":true},"ix":2},"nm":"R","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,-1.297],[1.32,0],[0,0],[0,0],[0,0]],"o":[[0,1.297],[0,0],[0,0],[0,0],[1.32,0]],"v":[[54.48,-10.493],[52.164,-8.362],[48.713,-8.362],[48.713,-12.624],[52.164,-12.624]],"c":true},"ix":2},"nm":"R","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"R","np":5,"cix":2,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[75.308,0],[78.898,0],[72.945,-15.45],[68.822,-15.45],[62.846,0],[66.459,0],[67.432,-2.664],[74.335,-2.664]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[70.884,-12.601],[73.431,-5.513],[68.312,-5.513]],"c":true},"ix":2},"nm":"A","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"A","np":5,"cix":2,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[97.935,0],[101.247,0],[101.247,-15.45],[96.615,-15.45],[92.862,-5.814],[89.11,-15.45],[84.5,-15.45],[84.5,0],[87.79,0],[87.79,-11.118],[92.144,0],[93.58,0],[97.935,-11.118]],"c":true},"ix":2},"nm":"M","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.988235294118,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"M","np":3,"cix":2,"ix":10,"mn":"ADBE Vector Group","hd":false}],"ip":16.0000162760417,"op":110.000111897786,"st":0,"bm":0},{"ddd":0,"ind":19,"ty":3,"nm":".chris-gannon-lottie-animation","cl":"chris-gannon-lottie-animation","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.45],"y":[1]},"o":{"x":[0.55],"y":[0]},"n":["0p45_1_0p55_0"],"t":72,"s":[0],"e":[-2]},{"i":{"x":[0.45],"y":[1]},"o":{"x":[0.55],"y":[0]},"n":["0p45_1_0p55_0"],"t":74,"s":[-2],"e":[0]},{"t":84.0000854492187}],"ix":10},"p":{"a":0,"k":[518,386,0],"ix":2},"a":{"a":0,"k":[178,146,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0},{"ddd":0,"ind":20,"ty":4,"nm":"body","parent":19,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.45],"y":[0]},"n":["0p833_0p833_0p45_0"],"t":0,"s":[0],"e":[-90]},{"t":17.0000172932943}],"ix":10,"x":"var $bm_rt;\nvar amp, freq, decay, n, t;\ntry {\n    amp = div(effect('Rotation - Overshoot')('ADBE Slider Control-0001'), 2.5), freq = div(effect('Rotation - Bounce')('ADBE Slider Control-0001'), 20), decay = div(effect('Rotation - Friction')('ADBE Slider Control-0001'), 20), n = 0, 0 < numKeys && (n = nearestKey(time).index, key(n).time > time && n--), t = 0 === n ? 0 : time - key(n).time, $bm_rt = 0 < n ? (v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10))), sum(value, div(mul(mul(div(v, 100), amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))))) : value;\n} catch (e$$4) {\n    $bm_rt = value = value;\n}"},"p":{"a":0,"k":[60,60,0],"ix":2},"a":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"n":"0p833_0p833_0p167_0p167","t":-27,"s":[-2,-6.5,0],"e":[-2,-6.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":56,"s":[-2,-6.5,0],"h":1},{"t":66.0000671386719,"s":[-2,-6.5,0],"h":1}],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ef":[{"ty":5,"nm":"Rotation - Overshoot","np":3,"mn":"ADBE Slider Control","ix":1,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":10,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Bounce","np":3,"mn":"ADBE Slider Control","ix":2,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":30,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]},{"ty":5,"nm":"Rotation - Friction","np":3,"mn":"ADBE Slider Control","ix":3,"en":1,"ef":[{"ty":0,"nm":"Slider","mn":"ADBE Slider Control-0001","ix":1,"v":{"a":0,"k":126,"ix":1,"x":"var $bm_rt;\n$bm_rt = clamp(value, 0, 100);"}}]}],"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":1,"k":[{"i":{"x":[0.14,0.14],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p14_1_0p167_0p167","0p14_1_0p167_0p167"],"t":-27,"s":[0,0],"e":[200,1]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.45,0.45],"y":[0,0]},"n":["0p833_0p833_0p45_0","0p833_0p833_0p45_0"],"t":0,"s":[200,1],"e":[216,302]},{"i":{"x":[0.833,0.833],"y":[1,1]},"o":{"x":[0.167,0.167],"y":[0,0]},"n":["0p833_1_0p167_0","0p833_1_0p167_0"],"t":17,"s":[216,302],"e":[216,302]},{"i":{"x":[0.197,0.45],"y":[1,1]},"o":{"x":[0.872,0.59],"y":[-0.522,0]},"n":["0p197_1_0p872_-0p522","0p45_1_0p59_0"],"t":97,"s":[216,302],"e":[0,200]},{"t":123.00012512207}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":20,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.992156982422,1,0.988234994926,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":4,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-2,-6.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":-27.0000274658203,"bm":0}]}],"layers":[{"ddd":0,"ind":3,"ty":0,"nm":".chris-gannon-instagram-lottie","cl":"chris-gannon-instagram-lottie","refId":"comp_4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,323,0],"ix":2},"a":{"a":0,"k":[400,300,0],"ix":1},"s":{"a":0,"k":[129,129,100],"ix":6}},"ao":0,"w":800,"h":600,"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"blueToPurple","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"g":{"p":5,"k":{"a":0,"k":[0.007,0.298,0.404,0.851,0.307,0.431,0.308,0.735,0.6,0.565,0.212,0.62,0.8,0.565,0.212,0.62,1,0.565,0.212,0.62,0,1,0.199,1,0.397,1,0.592,0.5,0.788,0],"ix":9}},"s":{"a":0,"k":[-258,-522],"ix":5},"e":{"a":0,"k":[-943,-866],"ix":6},"t":2,"h":{"a":0,"k":18.494,"ix":7},"a":{"a":0,"k":-100.276,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"yellowToOrange","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"g":{"p":7,"k":{"a":0,"k":[0.007,0.984,0.847,0.482,0.193,0.969,0.657,0.325,0.375,0.953,0.467,0.169,0.545,0.882,0.263,0.314,0.715,0.812,0.059,0.459,0.857,0.688,0.135,0.539,1,0.565,0.212,0.62,0,1,0.259,1,0.517,1,0.75,0.5,0.983,0],"ix":9}},"s":{"a":0,"k":[-140,330],"ix":5},"e":{"a":0,"k":[-637,989],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"bg","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[400,300,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[800,600],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.811764705882,0.058823529412,0.458823529412,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":124.000126139323,"st":0,"bm":0}]}
\ No newline at end of file
index ccd24b5..84df087 100755 (executable)
@@ -323,11 +323,13 @@ void CreateTextModel( const std::string& text,
   layoutParameters.startLineIndex = 0u;
   layoutParameters.estimatedNumberOfLines = logicalModel->mParagraphInfo.Count();
 
+  bool isAutoScroll = false;
   layoutEngine.LayoutText( layoutParameters,
                            glyphPositions,
                            lines,
                            layoutSize,
-                           false );
+                           false,
+                           isAutoScroll );
 
   // 10) Reorder the lines
   if( 0u != bidirectionalInfo.Count() )
index b9278e3..8b9bffd 100755 (executable)
@@ -187,11 +187,13 @@ bool LayoutTextTest( const LayoutTextData& data )
 
   layoutSize = Vector2::ZERO;
 
+  bool isAutoScroll = false;
   const bool updated = engine.LayoutText( layoutParameters,
                                           glyphPositions,
                                           lines,
                                           layoutSize,
-                                          data.ellipsis );
+                                          data.ellipsis,
+                                          isAutoScroll );
 
   // 4) Compare the results.
 
index 7e396e1..8c31999 100644 (file)
 using namespace Dali;
 using namespace Toolkit;
 
+namespace
+{
+
+const char* TEST_VECTOR_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR  "/insta_camera.json";
+
+}
+
 int UtcDaliVisualAction(void)
 {
   ToolkitTestApplication application;
@@ -290,3 +297,26 @@ int UtcDaliNPatchBufferGetRedOffsetAndMask(void)
 
   END_TEST;
 }
+
+int UtcDaliAnimatedVectorImageVisualCreateInstancePropertyMap(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualCreateInstancePropertyMap" );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE,  DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME  );
+
+  // request AnimatedVectorImageVisual with a property map
+  VisualFactory factory = VisualFactory::Get();
+  Visual::Base visual = factory.CreateVisual( propertyMap );
+  Toolkit::Internal::Visual::Base& visualImpl = GetImplementation( visual );
+
+  Property::Map resultMap;
+  visualImpl.CreateInstancePropertyMap( resultMap );
+
+  // check the property values from the returned map from a visual
+  DALI_TEST_CHECK( resultMap.Empty() );   // Now the map is empty
+
+  END_TEST;
+}
index fe9102e..c8215a5 100755 (executable)
@@ -10,6 +10,7 @@ SET(TC_SOURCES
   utc-Dali-AbsoluteLayout.cpp
   utc-Dali-Alignment.cpp
   utc-Dali-AnimatedImageVisual.cpp
+  utc-Dali-AnimatedVectorImageVisual.cpp
   utc-Dali-BinLayout.cpp
   utc-Dali-BloomView.cpp
   utc-Dali-BubbleEmitter.cpp
index eb1f2b8..dcf0560 100644 (file)
@@ -204,15 +204,6 @@ void Adaptor::SceneCreated()
 {
 }
 
-void Adaptor::SetViewMode( ViewMode mode )
-{
-}
-
-void Adaptor::SetStereoBase(  float stereoBase )
-{
-}
-
-
 class LogFactory : public LogFactoryInterface
 {
 public:
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
new file mode 100644 (file)
index 0000000..57733dd
--- /dev/null
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+#include <stdlib.h>
+#include <dali-toolkit-test-suite-utils.h>
+#include <toolkit-timer.h>
+#include <toolkit-event-thread-callback.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
+#include "dummy-control.h"
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+void dali_animated_vector_image_visual_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void dali_animated_vector_image_visual_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+const char* TEST_VECTOR_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR  "/insta_camera.json";
+
+}
+
+int UtcDaliVisualFactoryGetAnimatedVectorImageVisual01(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualFactoryGetAnimatedVectorImageVisual01: Request animated vector image visual with a json url" );
+
+  VisualFactory factory = VisualFactory::Get();
+  Visual::Base visual = factory.CreateVisual( TEST_VECTOR_IMAGE_FILE_NAME, ImageDimensions() );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+  actor.SetSize( 200.0f, 200.0f );
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  // Wait for resource ready event callback
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  // renderer is added to actor
+  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
+  Renderer renderer = actor.GetRendererAt( 0u );
+  DALI_TEST_CHECK( renderer );
+
+  // Test SetOffStage().
+  actor.Unparent();
+  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
+
+  END_TEST;
+}
+
+int UtcDaliVisualFactoryGetAnimatedVectorImageVisual02(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualFactoryGetAnimatedVectorImageVisual02: Request animated vector image visual with a Property::Map" );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME  );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+  actor.SetSize( 200.0f, 200.0f );
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  // Wait for resource ready event callback
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  // renderer is added to actor
+  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
+  Renderer renderer = actor.GetRendererAt( 0u );
+  DALI_TEST_CHECK( renderer );
+
+  actor.Unparent( );
+  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
+
+  END_TEST;
+}
+
+int UtcDaliAnimatedVectorImageVisualGetPropertyMap01(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualGetPropertyMap01" );
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE,  DevelVisual::ANIMATED_VECTOR_IMAGE )
+             .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME  );
+
+  // request AnimatedVectorImageVisual with a property map
+  VisualFactory factory = VisualFactory::Get();
+  Visual::Base visual = factory.CreateVisual( propertyMap );
+
+  Property::Map resultMap;
+  visual.CreatePropertyMap( resultMap );
+
+  // check the property values from the returned map from a visual
+  Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get< int >() == DevelVisual::ANIMATED_VECTOR_IMAGE );
+
+  value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get< std::string >() == TEST_VECTOR_IMAGE_FILE_NAME );
+
+  // request AnimatedVectorImageVisual with an URL
+  Visual::Base visual2 = factory.CreateVisual( TEST_VECTOR_IMAGE_FILE_NAME, ImageDimensions() );
+
+  resultMap.Clear();
+  visual2.CreatePropertyMap( resultMap );
+
+  // check the property values from the returned map from a visual
+  value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get< int >() == DevelVisual::ANIMATED_VECTOR_IMAGE );
+
+  value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get< std::string >() == TEST_VECTOR_IMAGE_FILE_NAME );
+
+  END_TEST;
+}
+
+int UtcDaliAnimatedVectorImageVisualPlayback(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualPlayback" );
+
+  {
+    // request AnimatedVectorImageVisual with a property map
+    VisualFactory factory = VisualFactory::Get();
+    Visual::Base visual = factory.CreateVisual(
+      Property::Map()
+      .Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+      .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME ) );
+
+    DummyControl dummyControl = DummyControl::New( true );
+    Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummyControl.GetImplementation() );
+    dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+    dummyControl.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+
+    Property::Map attributes;
+    tet_infoline( "Test Play action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
+
+    Stage::GetCurrent().Add( dummyControl );
+    application.SendNotification();
+    application.Render( 16 );
+
+    DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+    // test
+
+    tet_infoline( "Test Pause action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PAUSE, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+
+    tet_infoline( "Test Resume action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::RESUME, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+
+    tet_infoline( "Test Stop action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::STOP, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+
+    tet_infoline( "Test Stop action again" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::STOP, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+
+    tet_infoline( "Test Play action" );
+    DevelControl::DoAction( dummyControl, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::PLAY, attributes );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+
+    dummyControl.SetSize( 100.0f, 100.0f );
+
+    application.SendNotification();
+    application.Render(16);
+
+    // test
+    // Size should be changed
+
+    dummyControl.Unparent();
+  }
+
+  END_TEST;
+}
+
+int UtcDaliAnimatedVectorImageVisualCustomShader(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualCustomShader Test custom shader" );
+
+  VisualFactory factory = VisualFactory::Get();
+  Property::Map properties;
+  Property::Map shader;
+  const std::string vertexShader = "Foobar";
+  const std::string fragmentShader = "Foobar sampler2D Foobar";
+  shader[Visual::Shader::Property::FRAGMENT_SHADER] = fragmentShader;
+  shader[Visual::Shader::Property::VERTEX_SHADER] = vertexShader;
+
+  properties[Visual::Property::TYPE] = Visual::IMAGE;
+  properties[Visual::Property::SHADER] = shader;
+  properties[ImageVisual::Property::URL] = TEST_VECTOR_IMAGE_FILE_NAME;
+
+  Visual::Base visual = factory.CreateVisual( properties );
+
+  // trigger creation through setting on stage
+  DummyControl dummy = DummyControl::New( true );
+  Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  dummy.SetSize( 200.f, 200.f );
+  dummy.SetParentOrigin( ParentOrigin::CENTER );
+  Stage::GetCurrent().Add( dummy );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  Renderer renderer = dummy.GetRendererAt( 0 );
+  Shader shader2 = renderer.GetShader();
+  Property::Value value = shader2.GetProperty( Shader::Property::PROGRAM );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+
+  std::string resultFragmentShader, resultVertexShader;
+  Property::Value* fragment = map->Find( "fragment" ); // fragment key name from shader-impl.cpp
+  fragment->Get( resultFragmentShader );
+  DALI_TEST_CHECK( resultFragmentShader.find( fragmentShader ) != std::string::npos );
+
+  Property::Value* vertex = map->Find( "vertex" ); // vertex key name from shader-impl.cpp
+  vertex->Get( resultVertexShader );
+  DALI_TEST_CHECK( resultVertexShader.find( vertexShader ) != std::string::npos );
+
+  END_TEST;
+}
+
+int UtcDaliAnimatedVectorImageVisualNaturalSize(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimatedVectorImageVisualNaturalSize" );
+
+  VisualFactory factory = VisualFactory::Get();
+  Visual::Base visual = factory.CreateVisual( TEST_VECTOR_IMAGE_FILE_NAME, ImageDimensions() );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  Vector2 controlSize( 20.f, 30.f );
+  Vector2 naturalSize;
+
+  actor.SetSize( controlSize );
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  visual.GetNaturalSize( naturalSize );
+
+  DALI_TEST_EQUALS( naturalSize, controlSize, TEST_LOCATION );
+
+  END_TEST;
+}
index 23cc93a..e1a1714 100644 (file)
@@ -38,15 +38,6 @@ using namespace Toolkit;
 namespace
 {
 
-void TestLayoutItemOrder( std::vector< Control >& controls, LayoutGroup& layoutGroup )
-{
-  for( auto&& iter : controls )
-  {
-    unsigned int siblingOrder = static_cast< unsigned int>( iter.GetProperty< int >( DevelActor::Property::SIBLING_ORDER ) );
-    DALI_TEST_EQUALS( layoutGroup.GetChildAt( siblingOrder ), DevelControl::GetLayout( iter ), TEST_LOCATION );
-  }
-}
-
 // Turns the given control into a Root layout control and adds it to the stage.
 void SetupRootLayoutControl( Control& rootControl )
 {
@@ -2596,68 +2587,6 @@ int UtcDaliLayouting_VboxLayout_Padding(void)
 }
 
 
-int UtcDaliLayouting_RelayoutOnChildOrderChanged(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_RelayoutOnChildOrderChanged");
-  tet_infoline(" Test that if the sibling order changes, the container is re-laid out automatically");
-
-  Stage stage = Stage::GetCurrent();
-
-  auto hbox = Control::New();
-  auto hboxLayout = Test::CustomLayout::New();
-  DevelControl::SetLayout( hbox, hboxLayout );
-  hbox.SetName( "HBox");
-
-  std::vector< Control > controls;
-  controls.push_back( CreateLeafControl( 40, 40 ) );
-  controls.push_back( CreateLeafControl( 60, 40 ) );
-  controls.push_back( CreateLeafControl( 80, 40 ) );
-  controls.push_back( CreateLeafControl( 100, 40 ) );
-
-  for( auto&& iter : controls )
-  {
-    hbox.Add( iter );
-  }
-  hbox.SetParentOrigin( ParentOrigin::CENTER );
-  hbox.SetAnchorPoint( AnchorPoint::CENTER );
-  stage.Add( hbox );
-
-  // Ensure layouting happens
-  application.SendNotification();
-  application.Render();
-
-  // hbox centers elements vertically, it fills test harness stage, which is 480x800.
-  // hbox left justifies elements
-  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 40.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[2].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 100.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[3].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 180.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-
-  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 40.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 60.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[2].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 80.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[3].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-
-  controls[0].RaiseToTop(); // 0->3; 1, 2, 3, 0
-  controls[2].Lower();      // 2->1; 2, 1, 3, 0
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_EQUALS( controls[2].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 80.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[3].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 140.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 240.0f, 380.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-
-  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 40.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 60.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[2].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 80.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[3].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 40.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-
-  END_TEST;
-}
-
 int UtcDaliLayouting_HboxLayout_TargetSize(void)
 {
   ToolkitTestApplication application;
@@ -2795,7 +2724,7 @@ int UtcDaliLayouting_LayoutChildren03(void)
   END_TEST;
 }
 
-int UtcDaliLayouting_SetLayoutOrder01(void)
+int UtcDaliLayouting_SetLayoutOrder(void)
 {
   ToolkitTestApplication application;
   tet_infoline(" UtcDaliLayouting_SetLayoutOrder01 - Call SetLayout after adding the control to the root layout");
@@ -2836,110 +2765,6 @@ int UtcDaliLayouting_SetLayoutOrder01(void)
   END_TEST;
 }
 
-int UtcDaliLayouting_SetLayoutOrder02(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_SetLayoutOrder02 - Test the layout item order and the control order");
-
-  Stage stage = Stage::GetCurrent();
-
-  auto rootControl = Control::New();
-  auto absoluteLayout = AbsoluteLayout::New();
-  DevelControl::SetLayout( rootControl, absoluteLayout );
-  rootControl.SetName( "AbsoluteLayout" );
-  stage.Add( rootControl );
-
-  auto hbox = Control::New();
-  auto hboxLayout = LinearLayout::New();
-  hbox.SetName( "HBox");
-
-  rootControl.Add( hbox );
-
-  DevelControl::SetLayout( hbox, hboxLayout );
-
-  // Add child controls
-  std::vector< Control > controls;
-  controls.push_back( CreateLeafControl( 100, 100 ) );  // 0
-  controls.push_back( CreateLeafControl( 100, 100 ) );  // 1
-  controls.push_back( CreateLeafControl( 100, 100 ) );  // 2
-
-  for( auto&& iter : controls )
-  {
-    hbox.Add( iter );
-  }
-
-  // Ensure layouting happens
-  application.SendNotification();
-  application.Render();
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("RaiseToTop");
-
-  controls[0].RaiseToTop(); // 1 2 0
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("LowerToBottom");
-
-  controls[2].LowerToBottom();  // 2 1 0
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("Remove / Add");
-
-  hbox.Remove( controls[2] );  // 1 0
-  hbox.Add( controls[2] );     // 1 0 2
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("SetLayout");
-
-  auto vboxLayout = LinearLayout::New();
-  DevelControl::SetLayout( controls[0], vboxLayout ); // 1 2 0(vbox)
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("Raise");
-
-  controls[0].Raise();  // 1 2 0(vbox)
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("Lower");
-
-  controls[2].Lower();   // 2 1 0(vbox)
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("SetLayout again");
-
-  auto vboxLayout1 = LinearLayout::New();
-  DevelControl::SetLayout( controls[2], vboxLayout1 );  // 2 1(vbox1) 0(vbox)
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("SetLayout with empty handle");
-
-  DevelControl::SetLayout( controls[0], LayoutItem{} );  // 2 1(vbox1) 0
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("SetLayout to another control");
-
-  DevelControl::SetLayout( controls[2], vboxLayout1 );  // 2(vbox1) 1 0
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  tet_infoline("SetLayout to change layout");
-
-  DevelControl::SetLayout( controls[2], vboxLayout1 );  // 2(vbox) 1 0
-
-  TestLayoutItemOrder( controls, hboxLayout );
-
-  END_TEST;
-}
-
 
 int UtcDaliLayouting_LayoutGroup01(void)
 {
index c7e2e4f..2bf827a 100644 (file)
@@ -199,7 +199,7 @@ int UtcDaliLayouting_LayoutTransitionDataSetGetTransition(void)
 int UtcDaliLayouting_SetLayoutTransition01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_SetLayoutTransition01");
+  tet_infoline(" UtcDaliLayouting_SetLayoutTransition01" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -382,7 +382,7 @@ int UtcDaliLayouting_SetLayoutTransition01(void)
 int UtcDaliLayouting_AddChildLayoutTransition01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition01");
+  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition01" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -479,7 +479,7 @@ int UtcDaliLayouting_AddChildLayoutTransition01(void)
 int UtcDaliLayouting_RemoveChildLayoutTransition01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_RemoveChildLayoutTransition01");
+  tet_infoline(" UtcDaliLayouting_RemoveChildLayoutTransition01" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -679,7 +679,7 @@ int UtcDaliLayouting_RemoveChildLayoutTransition01(void)
 int UtcDaliLayouting_FocusChildLayoutTransition01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_FocusChildLayoutTransition01");
+  tet_infoline(" UtcDaliLayouting_FocusChildLayoutTransition01" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -734,7 +734,7 @@ int UtcDaliLayouting_FocusChildLayoutTransition01(void)
     map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::POSITION;
     map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Property::Value(); // capture from layout update
     map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
-       .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, "LINEAR")
+       .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, "LINEAR" )
        .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
          .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f )
          .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.0f ) );
@@ -743,11 +743,12 @@ int UtcDaliLayouting_FocusChildLayoutTransition01(void)
   {
     // Shrink the lost focus child
     Property::Map map;
+    map[ "affectsSiblings" ] = false;
     map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE;
     map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_LOST;
     map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 80.0f, 80.0f, 0 );
     map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
-         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, "LINEAR")
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, "LINEAR" )
          .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
            .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
            .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
@@ -756,6 +757,7 @@ int UtcDaliLayouting_FocusChildLayoutTransition01(void)
   {
     // Grow the gained focus child
     Property::Map map;
+    map[ "affectsSiblings" ] = false;
     map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE;
     map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_GAINED;
     map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 120.0f, 120.0f, 0 );
@@ -816,10 +818,310 @@ int UtcDaliLayouting_FocusChildLayoutTransition01(void)
   END_TEST;
 }
 
+int UtcDaliLayouting_FocusChildLayoutTransition02(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliLayouting_FocusChildLayoutTransition02" );
+
+  Stage stage = Stage::GetCurrent();
+  auto container = Control::New();
+  auto horizontalLayout = LinearLayout::New();
+  horizontalLayout.SetAnimateLayout( false );
+  horizontalLayout.SetOrientation( LinearLayout::Orientation::HORIZONTAL );
+
+  DevelControl::SetLayout( container, horizontalLayout );
+  container.SetName( "Container" );
+
+  std::vector< Control > controls;
+  controls.push_back( CreateLeafControl( 100, 100 ) );
+  controls.push_back( CreateLeafControl( 100, 100 ) );
+
+  stage.Add( container );
+  container.Add( controls[0] );
+  container.Add( controls[1] );
+
+  KeyInputFocusManager manager = KeyInputFocusManager::Get();
+  manager.SetFocus( controls[0] );
+
+  // Initial rendering done
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 100.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  horizontalLayout.SetAnimateLayout( true );
+
+  auto layoutTransitionData = LayoutTransitionData::New();
+  {
+    // Shrink the lost focus child width
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = false;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::POSITION;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // move all children
+  }
+  {
+    // Shrink the lost focus child width
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE_WIDTH;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_LOST;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = 80.0f;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus lost child
+  }
+  {
+    // Shrink the lost focus child height
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE_HEIGHT;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_LOST;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = 80.0f;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus lost child
+  }
+  {
+    // Grow the gained focus child
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_GAINED;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 120.0f, 120.0f, 0 );
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus gained child
+  }
+
+  horizontalLayout.SetTransitionData( LayoutTransitionData::ON_CHILD_FOCUS, layoutTransitionData );
+
+  bool signalReceived(false);
+  LayoutTransitionFinishCheck finishCheck(signalReceived);
+  layoutTransitionData.FinishedSignal().Connect(&application, finishCheck);
+  manager.SetFocus( controls[1] );
+
+  application.SendNotification();
+  application.Render( 1u /*just very beginning of the animation*/ );
+
+  finishCheck.CheckSignalNotReceived();
+  // Animation just started
+  DALI_TEST_EQUALS( container.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentPosition(), Vector3( 0.0f, 350.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentPosition(), Vector3( 100.0f, 350.0f, 0.0f ), 1.0f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>( 0.5f * 1000.0f ) + 1u /*just after the end of the animation*/ );
+
+  // Animation just finished
+  DALI_TEST_EQUALS( container.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentPosition(), Vector3( 0.0f, 360.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentPosition(), Vector3( 80.0f, 340.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 80.0f, 80.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize(), Vector3( 120.0f, 120.0f, 0.0f ), 1.0f, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render( 10u /* wait a bit more for a signal */ );
+
+  // Now sizes and positions are finally set
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 360.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 80.0f, 340.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 80.0f, 80.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 120.0f, 120.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  finishCheck.CheckSignalReceived();
+
+  END_TEST;
+}
+
+int UtcDaliLayouting_FocusChildLayoutTransition03(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliLayouting_FocusChildLayoutTransition03" );
+
+  Stage stage = Stage::GetCurrent();
+  auto container = Control::New();
+  auto horizontalLayout = LinearLayout::New();
+  horizontalLayout.SetAnimateLayout( false );
+  horizontalLayout.SetOrientation( LinearLayout::Orientation::HORIZONTAL );
+
+  DevelControl::SetLayout( container, horizontalLayout );
+  container.SetName( "Container" );
+
+  std::vector< Control > controls;
+  controls.push_back( CreateLeafControl( 100, 100 ) );
+  controls.push_back( CreateLeafControl( 100, 100 ) );
+
+  stage.Add( container );
+  container.Add( controls[0] );
+  container.Add( controls[1] );
+
+  KeyInputFocusManager manager = KeyInputFocusManager::Get();
+  manager.SetFocus( controls[0] );
+
+  // Initial rendering done
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 100.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  horizontalLayout.SetAnimateLayout( true );
+
+  auto layoutTransitionData = LayoutTransitionData::New();
+  {
+    // Shrink the lost focus child width
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = false;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::POSITION;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // move all children
+  }
+  {
+    // Shrink the lost focus child width
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SCALE_X;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_LOST;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = 0.8f;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus lost child
+  }
+  {
+    // Shrink the lost focus child height
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SCALE_Y;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_LOST;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = 0.8f;
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus lost child
+  }
+  {
+    // Grow the gained focus child
+    Property::Map map;
+    map[ LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS ] = true;
+    map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SCALE;
+    map[ LayoutTransitionData::AnimatorKey::CONDITION ] = LayoutTransitionData::Condition::ON_FOCUS_GAINED;
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 1.2f, 1.2f, 1.0f );
+    map[ LayoutTransitionData::AnimatorKey::TYPE ] = LayoutTransitionData::Animator::ANIMATE_TO;
+    map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
+         .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, AlphaFunction::LINEAR )
+         .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
+           .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f)
+           .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.5f));
+    layoutTransitionData.AddPropertyAnimator( Actor(), map ); // apply to on focus gained child
+  }
+
+  horizontalLayout.SetTransitionData( LayoutTransitionData::ON_CHILD_FOCUS, layoutTransitionData );
+
+  bool signalReceived(false);
+  LayoutTransitionFinishCheck finishCheck(signalReceived);
+  layoutTransitionData.FinishedSignal().Connect(&application, finishCheck);
+  manager.SetFocus( controls[1] );
+
+  application.SendNotification();
+  application.Render( 1u /*just very beginning of the animation*/ );
+
+  finishCheck.CheckSignalNotReceived();
+  // Animation just started
+  DALI_TEST_EQUALS( container.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentPosition(), Vector3( 0.0f, 350.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentPosition(), Vector3( 100.0f, 350.0f, 0.0f ), 1.0f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>( 0.5f * 1000.0f ) + 1u /*just after the end of the animation*/ );
+
+  // Animation just finished
+  DALI_TEST_EQUALS( container.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentPosition(), Vector3( -10.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentPosition(), Vector3( 90.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize() * controls[0].GetCurrentScale(), Vector3( 80.0f, 80.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize() * controls[1].GetCurrentScale(), Vector3( 120.0f, 120.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render( 10u /* wait a bit more for a signal */ );
+
+  // Now sizes and positions are finally set
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( -10.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 90.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ) * controls[0].GetProperty<Vector3>( Actor::Property::SCALE ), Vector3( 80.0f, 80.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetProperty<Vector3>( Actor::Property::SIZE ) * controls[1].GetProperty<Vector3>( Actor::Property::SCALE ), Vector3( 120.0f, 120.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+
+  finishCheck.CheckSignalReceived();
+
+  END_TEST;
+}
+
 int UtcDaliLayouting_AddChildLayoutTransition02_KeyFrames(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition02_KeyFrames");
+  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition02_KeyFrames" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -919,7 +1221,7 @@ int UtcDaliLayouting_AddChildLayoutTransition02_KeyFrames(void)
 int UtcDaliLayouting_AddChildLayoutTransition03_Path(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition03_Path");
+  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition03_Path" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -1047,7 +1349,7 @@ int UtcDaliLayouting_AddChildLayoutTransition03_Path(void)
 int UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy");
+  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -1089,7 +1391,7 @@ int UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy(void)
   {
     Property::Map map;
     map[ LayoutTransitionData::AnimatorKey::PROPERTY ] = Actor::Property::SIZE;
-    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 0.0f, 350.0f, 0 );
+    map[ LayoutTransitionData::AnimatorKey::TARGET_VALUE ] = Vector3( 10.0f, 10.0f, 0 );
     map[ LayoutTransitionData::AnimatorKey::ANIMATOR ] = Property::Map()
       .Add( LayoutTransitionData::AnimatorKey::TYPE, "ANIMATE_BY")
       .Add( LayoutTransitionData::AnimatorKey::ALPHA_FUNCTION, "LINEAR")
@@ -1122,7 +1424,7 @@ int UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy(void)
   DALI_TEST_EQUALS( controls[0].GetCurrentPosition(), Vector3( 0.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
 
   DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 110.0f, 110.0f, 0.0f ), 0.0001f, TEST_LOCATION );
 
   application.SendNotification();
   application.Render( 10u /* wait a bit more for a signal */ );
@@ -1132,7 +1434,7 @@ int UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy(void)
   DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 350.0f, 0.0f ), 0.0001f, TEST_LOCATION );
 
   DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 100.0f, 100.0f, 0.0f ), 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[0].GetProperty<Vector3>( Actor::Property::SIZE ), Vector3( 110.0f, 110.0f, 0.0f ), 0.0001f, TEST_LOCATION );
 
   finishCheck.CheckSignalReceived();
 
@@ -1142,7 +1444,7 @@ int UtcDaliLayouting_AddChildLayoutTransition04_AnimateBy(void)
 int UtcDaliLayouting_AddChildLayoutTransition05(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition05");
+  tet_infoline(" UtcDaliLayouting_AddChildLayoutTransition05" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -1382,7 +1684,7 @@ int UtcDaliLayouting_AddChildLayoutTransition05(void)
 int UtcDaliLayouting_DefaultTransition01(void)
 {
   ToolkitTestApplication application;
-  tet_infoline(" UtcDaliLayouting_DefaultTransition01");
+  tet_infoline(" UtcDaliLayouting_DefaultTransition01" );
 
   Stage stage = Stage::GetCurrent();
   auto container = Control::New();
@@ -1440,7 +1742,7 @@ int UtcDaliLayouting_DefaultTransition01(void)
          .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.0f ) );
     layoutTransitionData0.AddPropertyAnimator( controls[0], map );
   }
-  DevelControl::GetLayout( controls[0] ).SetTransitionData(LayoutTransitionData::Type::ON_LAYOUT_CHANGE, layoutTransitionData0 );
+  DevelControl::GetLayout( controls[0] ).SetTransitionData( LayoutTransitionData::Type::ON_LAYOUT_CHANGE, layoutTransitionData0 );
 
   auto layoutTransitionData1 = LayoutTransitionData::New();
   {
@@ -1465,9 +1767,9 @@ int UtcDaliLayouting_DefaultTransition01(void)
        .Add( LayoutTransitionData::AnimatorKey::TIME_PERIOD, Property::Map()
          .Add( LayoutTransitionData::AnimatorKey::DELAY, 0.0f )
          .Add( LayoutTransitionData::AnimatorKey::DURATION, 0.0f ) );
-    layoutTransitionData0.AddPropertyAnimator( controls[1], map );
+    layoutTransitionData1.AddPropertyAnimator( controls[1], map );
   }
-  DevelControl::GetLayout( controls[1] ).SetTransitionData(LayoutTransitionData::Type::ON_LAYOUT_CHANGE, layoutTransitionData1 );
+  DevelControl::GetLayout( controls[1] ).SetTransitionData( LayoutTransitionData::Type::ON_LAYOUT_CHANGE, layoutTransitionData1 );
 
   horizontalLayout.SetOrientation( LinearLayout::Orientation::VERTICAL );
 
@@ -1481,7 +1783,7 @@ int UtcDaliLayouting_DefaultTransition01(void)
 
   DALI_TEST_EQUALS( container.GetCurrentSize(), Vector3( 480.0f, 800.0f, 0.0f ), 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
-  DALI_TEST_EQUALS( controls[0].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( controls[1].GetCurrentSize(), Vector3( 100.0f, 100.0f, 0.0f ), 1.0f, TEST_LOCATION );
 
   // Now sizes and positions are set
   DALI_TEST_EQUALS( container.GetProperty<Vector3>( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), 0.0001f, TEST_LOCATION );
index ffa0a61..b1ae269 100755 (executable)
@@ -553,9 +553,9 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
 
   // Check the ellipsis property
-  DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
-  label.SetProperty( TextLabel::Property::ELLIPSIS, true );
   DALI_TEST_CHECK( label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
+  label.SetProperty( TextLabel::Property::ELLIPSIS, false );
+  DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
 
   // Check the layout direction property
   label.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT );
index 1cad2f5..2ddabe9 100755 (executable)
@@ -130,6 +130,7 @@ devel_api_visual_factory_header_files = \
 devel_api_visuals_header_files = \
   $(devel_api_src_dir)/visuals/animated-gradient-visual-properties-devel.h \
   $(devel_api_src_dir)/visuals/animated-image-visual-actions-devel.h \
+  $(devel_api_src_dir)/visuals/animated-vector-image-visual-actions-devel.h \
   $(devel_api_src_dir)/visuals/color-visual-properties-devel.h \
   $(devel_api_src_dir)/visuals/image-visual-properties-devel.h \
   $(devel_api_src_dir)/visuals/image-visual-actions-devel.h \
index 8ddc819..a8927f9 100644 (file)
@@ -172,61 +172,6 @@ Toolkit::LayoutGroup::LayoutId LayoutGroup::Insert( LayoutItem& target, LayoutIt
   return childLayout.layoutId;
 }
 
-Toolkit::LayoutGroup::LayoutId LayoutGroup::Move( LayoutItem& target, LayoutItem& child )
-{
-  // Remove child from the previous position
-  for( auto iter = mImpl->mChildren.begin() ; iter != mImpl->mChildren.end() ; ++iter )
-  {
-    if( iter->child.Get() == &child )
-    {
-      mImpl->mChildren.erase( iter );
-      break;
-    }
-  }
-
-  // Find target position
-  std::vector< Impl::ChildLayout >::iterator position;
-  for( auto iter = mImpl->mChildren.begin(); iter != mImpl->mChildren.end(); ++iter )
-  {
-    if( iter->child.Get() == &target )
-    {
-      position = iter;
-      break;
-    }
-  }
-
-  Impl::ChildLayout childLayout;
-  childLayout.layoutId = mImpl->mNextLayoutId++;
-  childLayout.child = &child;
-  mImpl->mChildren.insert( position, childLayout );
-
-  RequestLayout();
-
-  return childLayout.layoutId;
-}
-
-Toolkit::LayoutGroup::LayoutId LayoutGroup::MoveBack( LayoutItem& child )
-{
-  // Remove child from the previous position
-  for( auto iter = mImpl->mChildren.begin() ; iter != mImpl->mChildren.end() ; ++iter )
-  {
-    if( iter->child.Get() == &child )
-    {
-      mImpl->mChildren.erase( iter );
-      break;
-    }
-  }
-
-  Impl::ChildLayout childLayout;
-  childLayout.layoutId = mImpl->mNextLayoutId++;
-  childLayout.child = &child;
-  mImpl->mChildren.emplace_back( childLayout );
-
-  RequestLayout();
-
-  return childLayout.layoutId;
-}
-
 void LayoutGroup::RemoveAll()
 {
   for( auto iter = mImpl->mChildren.begin() ; iter != mImpl->mChildren.end() ; )
@@ -512,7 +457,6 @@ void LayoutGroup::OnInitialize()
 
     DevelActor::ChildAddedSignal( control ).Connect( mSlotDelegate, &LayoutGroup::ChildAddedToOwner );
     DevelActor::ChildRemovedSignal( control ).Connect( mSlotDelegate, &LayoutGroup::ChildRemovedFromOwner );
-    DevelActor::ChildOrderChangedSignal( control ).Connect( mSlotDelegate, &LayoutGroup::ChildOrderChanged );
     DevelHandle::PropertySetSignal( control ).Connect( mSlotDelegate, &LayoutGroup::OnOwnerPropertySet );
 
     if( control.GetParent() )
@@ -571,7 +515,6 @@ void LayoutGroup::OnUnparent()
   {
     DevelActor::ChildAddedSignal( control ).Disconnect( mSlotDelegate, &LayoutGroup::ChildAddedToOwner );
     DevelActor::ChildRemovedSignal( control ).Disconnect( mSlotDelegate, &LayoutGroup::ChildRemovedFromOwner );
-    DevelActor::ChildOrderChangedSignal( control ).Disconnect( mSlotDelegate, &LayoutGroup::ChildOrderChanged );
     DevelHandle::PropertySetSignal( control ).Disconnect( mSlotDelegate, &LayoutGroup::OnOwnerPropertySet );
   }
 }
@@ -675,42 +618,6 @@ void LayoutGroup::ChildRemovedFromOwner( Actor child )
   }
 }
 
-void LayoutGroup::ChildOrderChanged( Actor child )
-{
-  Toolkit::Control childControl = Toolkit::Control::DownCast( child );
-  if( childControl )
-  {
-    Internal::Control& childControlImpl = GetImplementation( childControl );
-    Internal::Control::Impl& childControlDataImpl = Internal::Control::Impl::Get( childControlImpl );
-
-    auto childLayout = childControlDataImpl.GetLayout();
-    if( childLayout )
-    {
-      Toolkit::Control control = Toolkit::Control::DownCast( GetOwner() );
-      unsigned int count = control.GetChildCount();
-      unsigned int index = static_cast< unsigned int >( childControl.GetProperty< int >( DevelActor::Property::SIBLING_ORDER ) );
-
-      // Find insertion position
-      while( ++index < count )
-      {
-        auto sibling = Toolkit::Control::DownCast( control.GetChildAt( index ) );
-        if( sibling )
-        {
-          auto siblingLayout = DevelControl::GetLayout( sibling );
-          if( siblingLayout )
-          {
-            Internal::LayoutItem& siblingLayoutImpl = GetImplementation( siblingLayout );
-            Move( siblingLayoutImpl, *childLayout );
-            return;
-          }
-        }
-      }
-
-      MoveBack( *childLayout );
-    }
-  }
-}
-
 void LayoutGroup::OnOwnerPropertySet( Handle& handle, Property::Index index, Property::Value value )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Concise, "LayoutGroup::OnOwnerPropertySet\n");
index 37aa90f..5a2796b 100644 (file)
@@ -111,19 +111,6 @@ public:
   Toolkit::LayoutGroup::LayoutId Insert( LayoutItem& target, LayoutItem& child ) override;
 
   /**
-   * @brief Move a child to another position
-   * @param[in] target The target item
-   * @param[in] child The item to move
-   */
-  Toolkit::LayoutGroup::LayoutId Move( LayoutItem& target, LayoutItem& child ) override;
-
-  /**
-   * @brief Move a child to back
-   * @param[in] child The item to move
-   */
-  Toolkit::LayoutGroup::LayoutId MoveBack( LayoutItem& child ) override;
-
-  /**
    * @brief Remove all layout children.
    *
    * @note This will not unparent owner's children
@@ -304,11 +291,6 @@ private:
   void ChildRemovedFromOwner( Actor child );
 
   /**
-   * Callback when child order is changed
-   */
-  void ChildOrderChanged( Actor child );
-
-  /**
    * Callback when an owner property is set. Triggers a relayout if it's a child property
    */
   void OnOwnerPropertySet( Handle& handle, Property::Index index, Property::Value value );
index 0b638de..fe26362 100644 (file)
@@ -273,7 +273,7 @@ void LayoutItem::Layout( LayoutLength l, LayoutLength t, LayoutLength r, LayoutL
   }
 
   LayoutData& layoutData = *mImpl->sLayoutData;
-  size_t size = layoutData.childrenPropertyAnimators.size();
+  size_t size = layoutData.childrenLayoutDataArray.size();
 
   bool changed = SetFrame( l, t, r, b );
 
@@ -284,9 +284,9 @@ void LayoutItem::Layout( LayoutLength l, LayoutLength t, LayoutLength r, LayoutL
     mImpl->ClearPrivateFlag( Impl::PRIVATE_FLAG_LAYOUT_REQUIRED );
   }
 
-  if ( size != layoutData.childrenPropertyAnimators.size() )
+  if ( size != layoutData.childrenLayoutDataArray.size() )
   {
-    layoutData.childrenPropertyAnimators.resize( size );
+    layoutData.childrenLayoutDataArray.resize( size );
   }
 
   mImpl->ClearPrivateFlag( Impl::PRIVATE_FLAG_FORCE_LAYOUT );
@@ -496,7 +496,7 @@ void LayoutItem::SetMeasuredDimensions( MeasuredSize measuredWidth, MeasuredSize
 LayoutLength LayoutItem::GetMeasuredWidth() const
 {
   // Get the size portion of the measured width
-  return  mImpl->mMeasuredWidth.GetSize();
+  return mImpl->mMeasuredWidth.GetSize();
 }
 
 LayoutLength LayoutItem::GetMeasuredHeight() const
@@ -599,52 +599,50 @@ bool LayoutItem::SetFrame( LayoutLength left, LayoutLength top, LayoutLength rig
   auto owner = GetOwner();
   auto actor = Actor::DownCast( owner );
   LayoutData& layoutData = *mImpl->sLayoutData;
+
   if( actor )
   {
-    if( mImpl->mAnimated && !layoutData.speculativeLayout )
+    if( changed || mImpl->mAnimated )
     {
-      LayoutItem* transitionOwner = layoutData.layoutTransition.layoutItem.Get();
-      LayoutTransitionDataPtr layoutTransitionDataPtr = GetTransitionData( layoutData.layoutTransition.layoutTransitionType );
+      layoutData.layoutPositionDataArray.push_back(
+        LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), mImpl->mAnimated ) );
+    }
 
-      // Found transition owner
-      if( transitionOwner == this && layoutTransitionDataPtr.Get() )
+    if( mImpl->mAnimated && !layoutData.speculativeLayout )
+    {
+      if( layoutData.layoutTransition.layoutTransitionType != -1 )
       {
-        DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame apply transition to (%s), transition type (%d)\n", actor.GetName().c_str(), layoutData.layoutTransition.layoutTransitionType );
-        layoutData.layoutPositionDataArray.push_back( LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), true ) );
-        layoutTransitionDataPtr->ConvertToLayoutDataElements( actor, layoutData );
-        changed = true;
+        LayoutItem* transitionOwner = layoutData.layoutTransition.layoutItem.Get();
+        LayoutTransitionDataPtr layoutTransitionDataPtr = GetTransitionData( layoutData.layoutTransition.layoutTransitionType );
+
+        // Found transition owner
+        if( transitionOwner == this && layoutTransitionDataPtr.Get() )
+        {
+          DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame apply transition to (%s), transition type (%d)\n", actor.GetName().c_str(), layoutData.layoutTransition.layoutTransitionType );
+          layoutTransitionDataPtr->CollectLayoutDataElements( actor, layoutData );
+          changed = true;
+        }
+        else
+        {
+          LayoutTransitionData::CollectChildrenLayoutDataElements( actor, layoutData );
+        }
       }
       else
       {
         if( changed )
         {
-          layoutTransitionDataPtr = GetTransitionData( Dali::Toolkit::LayoutTransitionData::ON_LAYOUT_CHANGE );
-          if ( layoutTransitionDataPtr )
+          LayoutTransitionDataPtr layoutTransitionDataPtr = GetTransitionData( Dali::Toolkit::LayoutTransitionData::ON_LAYOUT_CHANGE );
+          if( layoutTransitionDataPtr ) // has custom default animation and normal update
           {
             DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame apply custom default transition to (%s), transition type (%d)\n", actor.GetName().c_str(), Dali::Toolkit::LayoutTransitionData::ON_LAYOUT_CHANGE );
-            layoutData.layoutPositionDataArray.push_back( LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), true ) );
-            layoutTransitionDataPtr->ConvertToLayoutDataElements( actor, layoutData );
+            layoutTransitionDataPtr->CollectLayoutDataElements( actor, layoutData );
           }
           else
           {
             DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame apply default transition to (%s), transition type (%d)\n", actor.GetName().c_str(), layoutData.layoutTransition.layoutTransitionType );
-            layoutData.layoutPositionDataArray.push_back( LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), true ) );
-            GetDefaultTransition()->ConvertToLayoutDataElements( actor, layoutData );
+            GetDefaultTransition()->CollectLayoutDataElements( actor, layoutData );
           }
         }
-        else
-        {
-          DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::SetFrame apply children animators to (%s), transition type (%d)\n", actor.GetName().c_str(), layoutData.layoutTransition.layoutTransitionType );
-          layoutData.layoutPositionDataArray.push_back( LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), true ) );
-          LayoutTransitionData::ConvertChildrenAnimatorsToLayoutDataElements( actor, layoutData );
-        }
-      }
-    }
-    else
-    {
-      if( changed )
-      {
-        layoutData.layoutPositionDataArray.push_back( LayoutPositionData( actor, left.AsDecimal(), top.AsDecimal(), right.AsDecimal(), bottom.AsDecimal(), false ) );
       }
     }
   }
index 7c9414f..a55c7cb 100644 (file)
@@ -59,18 +59,6 @@ public:
    */
   virtual Toolkit::LayoutGroup::LayoutId Insert( LayoutItem& target, LayoutItem& item ) = 0;
 
-  /**
-   * @brief Move a child to another position
-   * @param[in] target The target item
-   * @param[in] item The item to move
-   */
-  virtual Toolkit::LayoutGroup::LayoutId Move( LayoutItem& target, LayoutItem& item ) = 0;
-
-  /**
-   * @brief Move a child to back
-   * @param[in] item The item to move
-   */
-  virtual Toolkit::LayoutGroup::LayoutId MoveBack( LayoutItem& item ) = 0;
 
 protected:
   virtual ~LayoutParent()
index d51d28a..6b56301 100644 (file)
@@ -50,17 +50,29 @@ public:
   {
     enum Type
     {
-      CONDITION,          ///< A condition triggering the transition animation (the actor is added/removed/focus gained/focus lost)
-      PROPERTY,           ///< A property to animate
-      INITIAL_VALUE,      ///< Initial value of an animated property
-      TARGET_VALUE,       ///< Target value of an animated property
-      ANIMATOR,           ///< Animator for an animated property
-      TYPE,               ///< Type of an animator
-      NAME,               ///< Name of an animator
-      TIME_PERIOD,        ///< Time period of an property animation
-      DURATION,           ///< Duration of an property animation
-      DELAY,              ///< Delay of an property animation
-      ALPHA_FUNCTION,     ///< Alpha function of a property animation
+      CONDITION,            ///< A condition triggering the transition animation (the actor is added/removed/focus gained/focus lost)
+      PROPERTY,             ///< A property to animate
+      INITIAL_VALUE,        ///< Initial value of an animated property
+      TARGET_VALUE,         ///< Target value of an animated property
+      ANIMATOR,             ///< Animator for an animated property
+      TYPE,                 ///< Type of an animator
+      NAME,                 ///< Name of an animator
+      TIME_PERIOD,          ///< Time period of an property animation
+      DURATION,             ///< Duration of an property animation
+      DELAY,                ///< Delay of an property animation
+      ALPHA_FUNCTION,       ///< Alpha function of a property animation
+      AFFECTS_SIBLINGS,     ///< Might change the actor siblings positions etc by updating the actor measured size if the actor size is changed due to the animation. False by default.
+    };
+  };
+
+  struct Animator
+  {
+    enum Type
+    {
+      ANIMATE_TO,           ///< Animate to property target value
+      ANIMATE_BY,           ///< Animate by property target value
+      ANIMATE_BETWEEN,      ///< Animate between property initial and target values
+      ANIMATE_PATH          ///< Animate using the animation path
     };
   };
 
diff --git a/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h b/dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h
new file mode 100644 (file)
index 0000000..6e40c69
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_ANIMATED_VECTOR_IMAGE_VISUAL_ACTIONS_DEVEL_H
+#define DALI_TOOLKIT_DEVEL_API_VISUALS_ANIMATED_VECTOR_IMAGE_VISUAL_ACTIONS_DEVEL_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelAnimatedVectorImageVisual
+{
+
+/**
+ * @brief Actions that the animated vector image visual can perform.  These actions are called through the Visual::Base::DoAction API.
+ */
+namespace Action
+{
+/**
+ * @brief The available actions for this visual
+ */
+enum Type
+{
+  PLAY,        ///< Play the animated vector image.
+  PAUSE,       ///< Pause the animated vector image.
+  RESUME,      ///< Resume the animated vector image.
+  STOP         ///< Stop the animated vector image. This is also Default playback mode.
+};
+
+} // namespace Action
+
+} // namespace DevelAnimatedVectorImageVisual
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_ANIMATED_VECTOR_IMAGE_VISUAL_ACTIONS_DEVEL_H
index ec53128..709b12a 100644 (file)
@@ -47,7 +47,8 @@ enum Type
   SVG            = Dali::Toolkit::Visual::SVG,
   ANIMATED_IMAGE = Dali::Toolkit::Visual::ANIMATED_IMAGE,
 
-  ANIMATED_GRADIENT = ANIMATED_IMAGE + 1,  //< Renders an animated gradient.
+  ANIMATED_GRADIENT     = ANIMATED_IMAGE + 1,  ///< Renders an animated gradient.
+  ANIMATED_VECTOR_IMAGE = ANIMATED_IMAGE + 2,  ///< Renders an animated vector image.
 };
 
 /**
index 3ec462b..2f7bd6b 100644 (file)
@@ -281,7 +281,7 @@ uint32_t Scene3dView::GetCameraCount()
 CameraActor Scene3dView::GetCamera( uint32_t cameraIndex )
 {
   CameraActor cameraActor;
-  if( cameraIndex < 0 || cameraIndex >= mCameraActorArray.size() )
+  if( cameraIndex >= mCameraActorArray.size() )
   {
     return cameraActor;
   }
index b065e99..7ca679c 100755 (executable)
@@ -1244,7 +1244,8 @@ void TextEditor::OnInitialize()
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
   // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( stage.GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
   mController->SetLayoutDirection( layoutDirection );
 
   // Forward input events to controller
index 655c335..2b76083 100755 (executable)
@@ -1304,7 +1304,8 @@ void TextField::OnInitialize()
   mController->SetNoTextLongPressAction( Controller::NoTextTap::HIGHLIGHT );
 
   // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( stage.GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
   mController->SetLayoutDirection( layoutDirection );
 
   // Forward input events to controller
index 376709a..473730d 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry-helper.h>
+#include <dali/public-api/common/stage.h>
 #include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/integration-api/debug.h>
@@ -363,7 +364,6 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
              // If request is enable (true) then start autoscroll as not already running
              else
              {
-               impl.mController->SetTextElideEnabled( false );
                impl.mController->SetAutoScrollEnabled( enableAutoScroll );
              }
           }
@@ -885,7 +885,8 @@ void TextLabel::OnInitialize()
   mController->SetTextElideEnabled( true );   // If false then text larger than control will overflow
 
   // Sets layoutDirection value
-  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Dali::LayoutDirection::Type layoutDirection = static_cast<Dali::LayoutDirection::Type>( stage.GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get<int>() );
   mController->SetLayoutDirection( layoutDirection );
 
   Layout::Engine& engine = mController->GetLayoutEngine();
index 8fab9fd..44be18c 100755 (executable)
@@ -28,6 +28,8 @@ toolkit_src_files = \
    $(toolkit_src_dir)/visuals/animated-image/fixed-image-cache.cpp \
    $(toolkit_src_dir)/visuals/animated-image/rolling-image-cache.cpp \
    $(toolkit_src_dir)/visuals/animated-image/rolling-gif-image-cache.cpp \
+   $(toolkit_src_dir)/visuals/animated-vector-image/animated-vector-image-visual.cpp \
+   $(toolkit_src_dir)/visuals/animated-vector-image/vector-image-rasterize-thread.cpp \
    $(toolkit_src_dir)/visuals/border/border-visual.cpp \
    $(toolkit_src_dir)/visuals/color/color-visual.cpp \
    $(toolkit_src_dir)/visuals/gradient/gradient-visual.cpp \
index d2e0119..746e8e5 100644 (file)
@@ -127,17 +127,11 @@ void LayoutController::Process()
     MeasureSpec widthSpec( stageWidth, MeasureSpec::Mode::EXACTLY );
     MeasureSpec heightSpec( stageHeight, MeasureSpec::Mode::EXACTLY );
 
-    // Test how to perform a measure on each control.
-    MeasureHierarchy( stage.GetRootLayer(), widthSpec, heightSpec );
-
-    LAYOUT_DEBUG_MEASURE_STATES( stage.GetRootLayer() );
-
     LayoutTransition layoutTransition;
     LayoutPositionDataArray layoutPositionDataArray;
-    LayoutDataArray layoutDataArray;
     LayoutAnimatorArray layoutAnimatorArray;
-    layoutAnimatorArray.push_back( LayoutDataAnimator() );
-    PropertyAnimatorArray childrenPropertiesAnimators;
+    LayoutDataArray layoutDataArray;
+    LayoutDataArray childrenLayoutDataArray;
 
     if ( mLayoutTransitions.size() )
     {
@@ -150,8 +144,28 @@ void LayoutController::Process()
       mLayoutRequested = false;
     }
 
-    LayoutData layoutData( layoutTransition, layoutPositionDataArray, layoutDataArray, layoutAnimatorArray, childrenPropertiesAnimators );
+    LayoutData layoutData( layoutTransition, layoutPositionDataArray, layoutAnimatorArray, layoutDataArray, childrenLayoutDataArray );
     LayoutItem::Impl::sLayoutData = &layoutData;
+
+    if( layoutTransition.layoutTransitionType != -1 )
+    {
+      UpdateMeasureHierarchyForAnimation( layoutData );
+    }
+
+    // Test how to perform a measure on each control.
+    MeasureHierarchy( stage.GetRootLayer(), widthSpec, heightSpec );
+
+    LAYOUT_DEBUG_MEASURE_STATES( stage.GetRootLayer() );
+
+    if( layoutTransition.layoutTransitionType != -1 )
+    {
+      RestoreActorsSpecs();
+    }
+
+    layoutAnimatorArray.clear();
+    layoutDataArray.clear();
+    childrenLayoutDataArray.clear();
+
     PerformLayout( stage.GetRootLayer(), 0, 0, stageWidth, stageHeight );
 
     PerformLayoutPositioning( layoutPositionDataArray, false );
@@ -199,6 +213,93 @@ void LayoutController::MeasureHierarchy( Actor root, MeasureSpec widthSpec, Meas
   }
 }
 
+void LayoutController::UpdateMeasureHierarchyForAnimation( LayoutData& layoutData )
+{
+  LayoutTransition& layoutTransition = layoutData.layoutTransition;
+  Actor transitionOwner = Actor::DownCast( layoutTransition.layoutItem.Get()->GetOwner() );
+  LayoutTransitionDataPtr layoutTransitionDataPtr = layoutTransition.layoutItem->GetTransitionData( layoutTransition.layoutTransitionType );
+
+  if( !layoutTransitionDataPtr->HasUpdateMeasuredSize() )
+  {
+    return;
+  }
+
+  layoutData.updateMeasuredSize = true;
+  layoutTransitionDataPtr->CollectLayoutDataElements( transitionOwner, layoutData );
+
+  UpdateMeasureHierarchyForAnimation( transitionOwner, layoutData );
+
+  for( auto layoutDataElement : layoutData.layoutDataArray )
+  {
+    if( !layoutDataElement.updateMeasuredSize )
+    {
+      continue;
+    }
+
+    Actor actor = Actor::DownCast( layoutDataElement.handle );
+    LayoutDataAnimator animator = layoutData.layoutAnimatorArray[ layoutDataElement.animatorIndex ];
+    float width = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION );
+    float height = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION );
+
+    if( layoutDataElement.AdjustMeasuredSize( width, height, animator.animatorType ) )
+    {
+      mActorSizeSpecs.push_back( ActorSizeSpec( actor ) );
+      actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, static_cast<int>( width ) );
+      actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, static_cast<int>( height ) );
+    }
+  }
+
+  layoutData.updateMeasuredSize = false;
+}
+
+void LayoutController::UpdateMeasureHierarchyForAnimation( Actor root, LayoutData& layoutData )
+{
+  Toolkit::Control control = Toolkit::Control::DownCast( root );
+  if( control )
+  {
+    DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LayoutController::UpdateMeasureHierarchyForAnimation control:%s\n", control.GetName().c_str() );
+    Internal::Control& controlImpl = GetImplementation( control );
+    Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( controlImpl );
+    LayoutItemPtr layout = controlDataImpl.GetLayout();
+
+    if( layout )
+    {
+      auto layoutGroup = Toolkit::LayoutGroup::DownCast( layout.Get() );
+      if( layoutGroup )
+      {
+        unsigned int childCount = layoutGroup.GetChildCount();
+        for( unsigned int i=0; i<childCount; ++i )
+        {
+          auto childLayout = layoutGroup.GetChildAt( i );
+          if( childLayout )
+          {
+            auto childControl = Toolkit::Control::DownCast( childLayout.GetOwner() );
+            LayoutTransitionData::CollectChildrenLayoutDataElements( childControl, layoutData );
+          }
+        }
+      }
+    }
+  }
+  else
+  {
+    // Depth first descent through actor children
+    for( unsigned int i = 0, count = root.GetChildCount(); i < count; ++i )
+    {
+      UpdateMeasureHierarchyForAnimation( root.GetChildAt( i ), layoutData );
+    }
+  }
+}
+
+void LayoutController::RestoreActorsSpecs()
+{
+  for( auto& actorSizeSpec : mActorSizeSpecs )
+  {
+    Actor actor = actorSizeSpec.actor;
+    actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, actorSizeSpec.widthSpec );
+    actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, actorSizeSpec.heightSpec );
+  }
+}
+
 void LayoutController::PerformLayout( Actor root, int left, int top, int right, int bottom )
 {
   Toolkit::Control control = Toolkit::Control::DownCast( root );
@@ -235,7 +336,6 @@ void LayoutController::PerformLayoutPositioning( LayoutPositionDataArray& layout
     Actor actor = Actor::DownCast( layoutPositionData.handle );
     if( actor && ( !layoutPositionData.animated || all ) )
     {
-      DALI_LOG_INFO( gLogFilter, Debug::Verbose, "LayoutController::PerformLayoutPositioning %s\n", actor.GetName().c_str() );
       if ( !layoutPositionData.animated )
       {
         actor.SetPosition( layoutPositionData.left, layoutPositionData.top );
@@ -256,16 +356,21 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio
   Animation animation = Animation::New( 0 );
   bool isAnimatorAdded = false;
 
+  if( layoutAnimatorArray.size() == 0 )
+  {
+    layoutAnimatorArray.push_back( LayoutDataAnimator() );
+  }
+
   for( auto layoutDataElement : layoutDataArray )
   {
-    if ( layoutDataElement.animatorIndex >= 0 )
+    if( layoutDataElement.animatorIndex >= 0 )
     {
       Actor actor = Actor::DownCast( layoutDataElement.handle );
       if ( actor )
       {
         LayoutDataAnimator animator = layoutAnimatorArray[ layoutDataElement.animatorIndex ];
         TimePeriod timePeriod = TimePeriod( 0, animation.GetDuration() );
-        if (animator.timePeriod.durationSeconds >= 0)
+        if( animator.timePeriod.durationSeconds >= 0 )
         {
           timePeriod = animator.timePeriod;
         }
@@ -275,7 +380,7 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio
         // Other values are set to current actor ones.
         if( value.GetType() == Property::NONE )
         {
-          if ( layoutDataElement.positionDataIndex < 0)
+          if( layoutDataElement.positionDataIndex < 0)
           {
             auto result = std::find_if( layoutPositionDataArray.begin(), layoutPositionDataArray.end(), [&actor](const LayoutPositionData& iter)
                           { return iter.handle == actor; } );
@@ -283,10 +388,23 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio
             {
               continue;
             }
-            layoutDataElement.positionDataIndex = std::distance(layoutPositionDataArray.begin(), result);
+            layoutDataElement.positionDataIndex = std::distance( layoutPositionDataArray.begin(), result );
           }
 
           LayoutPositionData& positionData = layoutPositionDataArray[ layoutDataElement.positionDataIndex ];
+          // with updated measured size scale animation the measured size includes scale, so we need to fit in the centre of the measured rectangle
+          // the real size child so that the all scale related animations placed correctly
+          if( positionData.updateWithCurrentSize )
+          {
+            Vector3 size = actor.GetCurrentSize();
+            float dX = ( ( positionData.right - positionData.left ) - size.width ) / 2;
+            float dY = ( ( positionData.bottom - positionData.top ) - size.height ) / 2;
+            positionData.left += dX;
+            positionData.top += dY;
+            positionData.right -= dX;
+            positionData.bottom -= dY;
+            positionData.updateWithCurrentSize = false;
+          }
 
           switch ( layoutDataElement.propertyIndex )
           {
@@ -313,7 +431,7 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio
           }
         }
 
-        // Failed to get target value, just move the next one
+        // Failed to get target value, just move to the next one
         if( value.GetType() == Property::NONE )
         {
           continue;
@@ -327,29 +445,31 @@ void LayoutController::PerformLayoutAnimation( LayoutTransition& layoutTransitio
         }
 
         // Create an animator for the property
-        switch (animator.animatorType)
-        {
-        case LayoutDataAnimator::AnimatorType::ANIMATE_TO:
+        switch( animator.animatorType )
         {
-          animation.AnimateTo( Property( actor, layoutDataElement.propertyIndex ), value, animator.alphaFunction, timePeriod );
-          break;
-        }
-        case LayoutDataAnimator::AnimatorType::ANIMATE_BY:
-        {
-          animation.AnimateBy( Property( actor, layoutDataElement.propertyIndex ), value, animator.alphaFunction, timePeriod );
-          break;
-        }
-        case LayoutDataAnimator::AnimatorType::ANIMATE_BETWEEN:
-        {
-          animation.AnimateBetween( Property( actor, layoutDataElement.propertyIndex ), animator.keyFrames, animator.alphaFunction, animator.interpolation );
-          break;
-        }
-        case LayoutDataAnimator::AnimatorType::ANIMATE_PATH:
-          animation.Animate( actor, animator.path, animator.forward, animator.alphaFunction, timePeriod );
-          break;
+          case Toolkit::LayoutTransitionData::Animator::ANIMATE_TO:
+          {
+            animation.AnimateTo( Property( actor, layoutDataElement.propertyIndex ), value, animator.alphaFunction, timePeriod );
+            break;
+          }
+          case Toolkit::LayoutTransitionData::Animator::ANIMATE_BY:
+          {
+            animation.AnimateBy( Property( actor, layoutDataElement.propertyIndex ), value, animator.alphaFunction, timePeriod );
+            break;
+          }
+          case Toolkit::LayoutTransitionData::Animator::ANIMATE_BETWEEN:
+          {
+            animation.AnimateBetween( Property( actor, layoutDataElement.propertyIndex ), animator.keyFrames, animator.alphaFunction, animator.interpolation );
+            break;
+          }
+          case Toolkit::LayoutTransitionData::Animator::ANIMATE_PATH:
+          {
+            animation.Animate( actor, animator.path, animator.forward, animator.alphaFunction, timePeriod );
+            break;
+          }
         }
+        isAnimatorAdded = true;
       }
-      isAnimatorAdded = true;
     }
   }
 
index 71c947c..7443776 100644 (file)
@@ -92,6 +92,27 @@ protected: // Implementation of Processor
   virtual void Process();
 
 private:
+  struct ActorSizeSpec
+  {
+    ActorSizeSpec(Actor actor)
+    : actor( actor )
+    , widthSpec( actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION ) )
+    , heightSpec( actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION ) )
+    {
+    }
+
+    Actor actor;
+    int widthSpec;
+    int heightSpec;
+  };
+  std::vector<ActorSizeSpec> mActorSizeSpecs;
+
+  void UpdateMeasureHierarchyForAnimation( LayoutData& layoutData );
+
+  void UpdateMeasureHierarchyForAnimation( Actor root, LayoutData& layoutData );
+
+  void RestoreActorsSpecs();
+
   std::list< LayoutTransition > mLayoutTransitions;
   struct AnimationFinishedFunctor
   {
index f65f874..fa24192 100644 (file)
@@ -36,6 +36,7 @@ Debug::Filter* gLayoutFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG
 
 // Key tokens
 const char* TOKEN_CONDITION("condition");
+const char* TOKEN_AFFECTS_SIBLINGS("affectsSiblings");
 const char* TOKEN_PROPERTY("property");
 const char* TOKEN_INITIAL_VALUE("initialValue");
 const char* TOKEN_TARGET_VALUE("targetValue");
@@ -47,6 +48,13 @@ const char* TOKEN_DURATION("duration");
 const char* TOKEN_DELAY("delay");
 const char* TOKEN_ALPHA_FUNCTION("alphaFunction");
 
+DALI_ENUM_TO_STRING_TABLE_BEGIN( ANIMATOR_TYPE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_TO )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BY )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_BETWEEN )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::LayoutTransitionData::Animator::Type, ANIMATE_PATH )
+DALI_ENUM_TO_STRING_TABLE_END( ANIMATOR_TYPE )
+
 DALI_ENUM_TO_STRING_TABLE_BEGIN( ALPHA_FUNCTION_BUILTIN )
 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, LINEAR)
 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::AlphaFunction, REVERSE)
@@ -72,7 +80,135 @@ namespace Toolkit
 namespace Internal
 {
 
-LayoutTransitionData::LayoutTransitionData()
+bool LayoutDataElement::AdjustMeasuredSize( float& width, float& height, Toolkit::LayoutTransitionData::Animator::Type animatorType )
+{
+  bool adjusted = true;
+  if( targetValue.GetType() == Property::NONE )
+  {
+    return false;
+  }
+
+  Actor actor = Actor::DownCast( handle );
+  float animateByMultiplier = ( animatorType == Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ) ? 1.0f : 0.0f;
+  Vector3 size = actor.GetCurrentSize();
+
+  switch ( targetValue.GetType() )
+  {
+    case Property::Type::VECTOR3:
+    {
+      Vector3 value = targetValue.Get<Vector3>();
+      switch( propertyIndex )
+      {
+        case Actor::Property::SCALE:
+        {
+          width = size.x * ( animateByMultiplier + value.x );
+          height = size.y * ( animateByMultiplier + value.y );
+          break;
+        }
+        case Actor::Property::SIZE:
+        {
+          width = value.x + ( animateByMultiplier * size.x );
+          height = value.y + ( animateByMultiplier * size.y );
+          break;
+        }
+        default:
+        {
+          adjusted = false;
+          break;
+        }
+      }
+      break;
+    }
+    case Property::Type::FLOAT:
+    {
+      float value = targetValue.Get<float>();
+      switch( propertyIndex )
+      {
+        case Actor::Property::SCALE_X:
+        {
+          width = size.x * ( animateByMultiplier + value );
+          break;
+        }
+        case Actor::Property::SCALE_Y:
+        {
+          height = size.y * ( animateByMultiplier + value );
+          break;
+        }
+        case Actor::Property::SIZE_WIDTH:
+        {
+          width = value + ( animateByMultiplier * size.x );
+          break;
+        }
+        case Actor::Property::SIZE_HEIGHT:
+        {
+          height = value + ( animateByMultiplier * size.y );
+          break;
+        }
+        default:
+        {
+          adjusted = true;
+          break;
+        }
+      }
+      break;
+    }
+    default:
+    {
+      adjusted = false;
+      break;
+    }
+  }
+
+  return adjusted;
+}
+
+void LayoutDataElement::UpdatePropertyIndex()
+{
+  if( propertyIndex == -1 && handle && !propertyName.empty() )
+  {
+    Actor actor = Actor::DownCast( handle );
+    propertyIndex = DevelHandle::GetPropertyIndex( actor, Property::Key( propertyName ) );
+  }
+}
+
+void LayoutDataElement::UpdateAnimatorIndex( const LayoutAnimatorArray& animators )
+{
+  if( animatorIndex == -1 )
+  {
+    if( animatorName.empty() )
+    {
+      animatorIndex = 0;
+      return;
+    }
+
+    std::string animatorName = this->animatorName;
+    auto animator = std::find_if( animators.begin(), animators.end(), [ &animatorName ](const LayoutDataAnimator& iter) {
+      return ( iter.name == animatorName ); } );
+    if( animator != animators.end() )
+    {
+      animatorIndex = std::distance( animators.begin(), animator );
+    }
+  }
+}
+
+void LayoutDataElement::UpdatePositionDataIndex( LayoutData& layoutData )
+{
+    positionDataIndex = layoutData.layoutPositionDataArray.size() - 1;
+    switch( propertyIndex )
+    {
+      case Actor::Property::SCALE:
+      case Actor::Property::SCALE_X:
+      case Actor::Property::SCALE_Y:
+        if( positionDataIndex != -1 && updateMeasuredSize )
+        {
+          layoutData.layoutPositionDataArray[ positionDataIndex ].updateWithCurrentSize = true;
+        }
+        break;
+    }
+}
+
+LayoutTransitionData::LayoutTransitionData() :
+  mUpdateMeasuredSize( false )
 {
 }
 
@@ -119,17 +255,35 @@ LayoutTransitionData::PropertyAnimator::PropertyAnimator( Actor actor, Property:
 
 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map )
 {
-  mPropertyAnimators.push_back( PropertyAnimator( actor, map ) );
+  LayoutDataElement layoutDataElement;
+  if( ConvertToLayoutDataElement( PropertyAnimator( actor, map ), layoutDataElement ) )
+  {
+    mLayoutDataElements.push_back( layoutDataElement );
+  }
+
+  UpdateAnimatorsIndices();
 }
 
 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation )
 {
-  mPropertyAnimators.push_back( PropertyAnimator( actor, map, keyFrames, interpolation ) );
+  LayoutDataElement layoutDataElement;
+  if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, keyFrames, interpolation ), layoutDataElement ) )
+  {
+    mLayoutDataElements.push_back( layoutDataElement );
+  }
+
+  UpdateAnimatorsIndices();
 }
 
 void LayoutTransitionData::AddPropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward )
 {
-  mPropertyAnimators.push_back( PropertyAnimator( actor, map, path, forward ) );
+  LayoutDataElement layoutDataElement;
+  if( ConvertToLayoutDataElement( PropertyAnimator( actor, map, path, forward ), layoutDataElement ) )
+  {
+    mLayoutDataElements.push_back( layoutDataElement );
+  }
+
+  UpdateAnimatorsIndices();
 }
 
 bool LayoutTransitionData::ConvertToLayoutAnimator( const Property::Map& animatorMap, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutDataAnimator )
@@ -305,26 +459,30 @@ bool LayoutTransitionData::ConvertToLayoutAnimator( const Property::Map& animato
       if( value.GetType() == Property::STRING )
       {
         std::string animatorType = value.Get<std::string>();
-        if( animatorType == "ANIMATE_TO" )
+        if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO ].string )
         {
-          layoutDataAnimator.animatorType = LayoutDataAnimator::AnimatorType::ANIMATE_TO;
+          layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_TO;
         }
-        else if( animatorType == "ANIMATE_BY" )
+        else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY ].string )
         {
-          layoutDataAnimator.animatorType = LayoutDataAnimator::AnimatorType::ANIMATE_BY;
+          layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BY;
         }
-        else if( animatorType == "ANIMATE_BETWEEN" )
+        else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN ].string )
         {
-          layoutDataAnimator.animatorType = LayoutDataAnimator::AnimatorType::ANIMATE_BETWEEN;
+          layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_BETWEEN;
           layoutDataAnimator.keyFrames = propertyAnimator.keyFrames;
         }
-        else if( animatorType == "ANIMATE_PATH" )
+        else if( animatorType == ANIMATOR_TYPE_TABLE[ Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH ].string )
         {
-          layoutDataAnimator.animatorType = LayoutDataAnimator::AnimatorType::ANIMATE_PATH;
+          layoutDataAnimator.animatorType = Toolkit::LayoutTransitionData::Animator::Type::ANIMATE_PATH;
           layoutDataAnimator.path = propertyAnimator.path;
           layoutDataAnimator.forward = propertyAnimator.forward;
         }
       }
+      else if ( value.GetType() == Property::INTEGER )
+      {
+        layoutDataAnimator.animatorType = static_cast<Toolkit::LayoutTransitionData::Animator::Type>( pair.second.Get<int>() );
+      }
     }
     else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::TIME_PERIOD )
     {
@@ -366,11 +524,19 @@ bool LayoutTransitionData::ConvertToLayoutAnimator( const Property::Map& animato
   return valid;
 }
 
-bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement, LayoutData& layoutData )
+bool LayoutTransitionData::ConvertToLayoutDataElement(
+    const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement )
 {
   const Property::Map& map = propertyAnimator.map;
   bool propertyFound = false;
 
+  if( mLayoutAnimators.size() == 0 )
+  {
+    mLayoutAnimators.push_back( LayoutDataAnimator() );
+  }
+
+  layoutDataElement.handle = propertyAnimator.handle;
+
   for( unsigned int mapIdx = 0; mapIdx < map.Count(); ++mapIdx )
   {
     const KeyValuePair pair( map.GetKeyValue( mapIdx ) );
@@ -400,6 +566,10 @@ bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& p
       {
         indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::ANIMATOR;
       }
+      else if( key == TOKEN_AFFECTS_SIBLINGS )
+      {
+        indexKey = Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS;
+      }
     }
     else
     {
@@ -410,12 +580,20 @@ bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& p
     {
       layoutDataElement.condition = value.Get<int>();
     }
+    else if ( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::AFFECTS_SIBLINGS )
+    {
+      layoutDataElement.updateMeasuredSize = value.Get<bool>();
+      if( layoutDataElement.updateMeasuredSize )
+      {
+        mUpdateMeasuredSize = true;
+      }
+    }
     else if( indexKey == Dali::Toolkit::LayoutTransitionData::AnimatorKey::PROPERTY )
     {
       if( value.GetType() == Property::STRING )
       {
-        Actor actor = Actor::DownCast( layoutDataElement.handle );
-        layoutDataElement.propertyIndex = DevelHandle::GetPropertyIndex( actor, Property::Key( value.Get<std::string>() ) );
+        layoutDataElement.propertyName = value.Get<std::string>();
+        layoutDataElement.UpdatePropertyIndex();
       }
       else
       {
@@ -435,20 +613,8 @@ bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& p
     {
       if( value.GetType() == Property::STRING )
       {
-        std::string animatorName = value.Get<std::string>();
-        if ( animatorName.empty() )
-        {
-          layoutDataElement.animatorIndex = 0;
-        }
-        else
-        {
-          auto animator = std::find_if( layoutData.layoutAnimatorArray.begin(), layoutData.layoutAnimatorArray.end(), [&animatorName](const LayoutDataAnimator& iter) {
-            return (iter.name == animatorName); } );
-          if( animator != layoutData.layoutAnimatorArray.end() )
-          {
-            layoutDataElement.animatorIndex = std::distance( layoutData.layoutAnimatorArray.begin(), animator );
-          }
-        }
+        layoutDataElement.animatorName = value.Get<std::string>();
+        layoutDataElement.UpdateAnimatorIndex( mLayoutAnimators );
       }
       else if ( value.GetType() == Property::MAP )
       {
@@ -456,8 +622,8 @@ bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& p
         LayoutDataAnimator layoutDataAnimator;
         if( ConvertToLayoutAnimator( animatorMap, propertyAnimator, layoutDataAnimator ) )
         {
-          layoutData.layoutAnimatorArray.push_back( layoutDataAnimator );
-          layoutDataElement.animatorIndex = layoutData.layoutAnimatorArray.size()-1;
+          mLayoutAnimators.push_back( layoutDataAnimator );
+          layoutDataElement.animatorIndex = mLayoutAnimators.size() - 1;
         }
       }
     }
@@ -466,20 +632,20 @@ bool LayoutTransitionData::ConvertToLayoutDataElement( const PropertyAnimator& p
   return propertyFound;
 }
 
-void LayoutTransitionData::ConvertChildrenAnimatorsToLayoutDataElements( Actor child, LayoutData& layoutData )
+void LayoutTransitionData::CollectChildrenLayoutDataElements( Actor child, LayoutData& layoutData )
 {
   LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
   // Add the children animators
-  for( const PropertyAnimator& iter : layoutData.childrenPropertyAnimators )
+  for( const LayoutDataElement& iter : layoutData.childrenLayoutDataArray )
   {
-    LayoutDataElement layoutDataElement;
-    layoutDataElement.handle = child;
-    layoutDataElement.positionDataIndex = layoutData.layoutPositionDataArray.size() - 1;
+    if( iter.handle != nullptr && iter.handle != child )
+    {
+      continue;
+    }
 
-    if( ConvertToLayoutDataElement( iter, layoutDataElement, layoutData ) )
+    LayoutDataElement layoutDataElement = iter;
+    switch ( layoutDataElement.condition )
     {
-      switch ( layoutDataElement.condition )
-      {
       case Dali::Toolkit::LayoutTransitionData::Condition::ON_ADD:
         if ( layoutData.layoutTransition.layoutTransitionType != Dali::Toolkit::LayoutTransitionData::ON_CHILD_ADD
             || layoutData.layoutTransition.gainedChild != child )
@@ -510,35 +676,58 @@ void LayoutTransitionData::ConvertChildrenAnimatorsToLayoutDataElements( Actor c
         break;
       default:
         break;
-      }
+    }
 
-      layoutDataArray.push_back( layoutDataElement );
+    if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
+    {
+      continue;
     }
+
+    layoutDataElement.handle = child;
+    layoutDataElement.UpdatePropertyIndex();
+    layoutDataElement.UpdatePositionDataIndex( layoutData );
+    layoutDataArray.push_back( layoutDataElement );
   }
 }
 
-void LayoutTransitionData::ConvertToLayoutDataElements( Actor owner, LayoutData& layoutData )
+void LayoutTransitionData::UpdateAnimatorsIndices()
 {
-  LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
+  for( LayoutDataElement& iter: mLayoutDataElements )
+  {
+    iter.UpdateAnimatorIndex( mLayoutAnimators );
+  }
+}
 
-  // Add the children animators
-  ConvertChildrenAnimatorsToLayoutDataElements( owner, layoutData );
+void LayoutTransitionData::CollectLayoutDataElements( Actor owner, LayoutData& layoutData )
+{
+  LayoutAnimatorArray& layoutAnimatorArray = layoutData.layoutAnimatorArray;
+  LayoutAnimatorArray::iterator it = mLayoutAnimators.begin();
+  if (layoutAnimatorArray.size() != 0)
+  {
+    // skip default animator
+    ++it;
+  }
+  std::copy( it, mLayoutAnimators.end(), std::back_inserter( layoutAnimatorArray ) );
 
-  // Add the transition animators
-  for( const PropertyAnimator& iter : mPropertyAnimators )
+  LayoutDataArray& layoutDataArray = layoutData.layoutDataArray;
+  // Collect the transition animators
+  for( const LayoutDataElement& iter : mLayoutDataElements )
   {
-    if( iter.handle == nullptr )
+    if( iter.handle == nullptr || iter.handle != owner )
     {
-      layoutData.childrenPropertyAnimators.push_back( iter );
+      layoutData.childrenLayoutDataArray.push_back( iter );
       continue;
     }
 
-    LayoutDataElement layoutDataElement;
-    layoutDataElement.handle = iter.handle;
-    if( ConvertToLayoutDataElement( iter, layoutDataElement, layoutData ) )
+    LayoutDataElement layoutDataElement = iter;
+    if( layoutData.updateMeasuredSize && !layoutDataElement.updateMeasuredSize )
     {
-      layoutDataArray.push_back( layoutDataElement );
+      continue;
     }
+
+    layoutDataElement.UpdatePropertyIndex();
+    layoutDataElement.UpdatePositionDataIndex( layoutData );
+    layoutDataArray.push_back( layoutDataElement );
   }
 }
 
@@ -556,6 +745,11 @@ void LayoutTransitionData::EmitSignalFinish( int layoutTransitionType )
   }
 }
 
+bool LayoutTransitionData::HasUpdateMeasuredSize()
+{
+  return mUpdateMeasuredSize;
+}
+
 } // namespace Internal
 } // namespace Toolkit
 } // namespace Dali
index dec0b76..348f2d9 100644 (file)
@@ -68,16 +68,8 @@ const float DEFAULT_TRANSITION_DURATION( 0.5f );
 
 struct LayoutDataAnimator
 {
-   enum class AnimatorType
-   {
-     ANIMATE_TO,
-     ANIMATE_BY,
-     ANIMATE_BETWEEN,
-     ANIMATE_PATH
-   };
-
    LayoutDataAnimator()
-   : animatorType( AnimatorType::ANIMATE_TO ),
+   : animatorType( Toolkit::LayoutTransitionData::Animator::ANIMATE_TO ),
      alphaFunction( AlphaFunction::LINEAR ),
      timePeriod( 0.0f, DEFAULT_TRANSITION_DURATION ),
      interpolation( Animation::Linear )
@@ -85,7 +77,7 @@ struct LayoutDataAnimator
    }
 
    std::string name;
-   AnimatorType animatorType;
+   Toolkit::LayoutTransitionData::Animator::Type animatorType;
    AlphaFunction alphaFunction;
    TimePeriod timePeriod;
 
@@ -101,7 +93,7 @@ using LayoutAnimatorArray = std::vector< LayoutDataAnimator >;
 struct LayoutPositionData
 {
   LayoutPositionData( Handle handle, float left, float top, float right, float bottom, bool animated ) :
-      handle( handle ), left( left ), top( top ), right( right ), bottom( bottom ), animated( animated )
+      handle( handle ), left( left ), top( top ), right( right ), bottom( bottom ), animated( animated ), updateWithCurrentSize(false)
   {
   };
 
@@ -111,6 +103,7 @@ struct LayoutPositionData
   float right;
   float bottom;
   bool animated;
+  bool updateWithCurrentSize;
 };
 
 using LayoutPositionDataArray = std::vector< LayoutPositionData >;
@@ -121,19 +114,30 @@ struct LayoutDataElement
   : propertyIndex( Property::INVALID_KEY ),
     animatorIndex( -1 ),
     positionDataIndex(-1 ),
-    condition( Dali::Toolkit::LayoutTransitionData::Condition::NONE )
+    condition( Dali::Toolkit::LayoutTransitionData::Condition::NONE ),
+    updateMeasuredSize( false )
   {
   };
 
+  bool AdjustMeasuredSize( float& width, float& height, Toolkit::LayoutTransitionData::Animator::Type animatorType );
+  void UpdatePropertyIndex();
+  void UpdateAnimatorIndex( const LayoutAnimatorArray& animators );
+  void UpdatePositionDataIndex( LayoutData& layoutData );
+
   BaseHandle handle;
+  std::string propertyName;
   Property::Index propertyIndex;
   Property::Value initialValue;
   Property::Value targetValue;
+  std::string animatorName;
   int animatorIndex;
   int positionDataIndex;
   int condition;
+  bool updateMeasuredSize;
 };
 
+using LayoutDataArray = std::vector< LayoutDataElement >;
+
 class LayoutTransitionData;
 using LayoutTransitionDataPtr = IntrusivePtr<LayoutTransitionData>;
 
@@ -160,7 +164,6 @@ public:
     Path path;
     Vector3 forward;
   };
-
   using PropertyAnimatorArray = std::vector< PropertyAnimator >;
 
   static LayoutTransitionDataPtr New();
@@ -173,7 +176,7 @@ public:
    * @param[in] actor The actor
    * @param[in] map The map containing the transition animator keys
    *
-   * This will add the property animator to the list of animators related to this transition
+   * This will parse the property animator map and add the layout data element to the array of layout data elements related to this transition
    */
   void AddPropertyAnimator( Actor actor, Property::Map map );
 
@@ -184,7 +187,7 @@ public:
    * @param[in] keyFrames The key frames used by the property animator
    * @param[in] interpolation The interpolation used by the property animator
    *
-   * This will add the property animator to the list of animators related to this transition
+   * This will parse the property animator map and add the layout data element to the array of layout data elements related to this transition
    */
   void AddPropertyAnimator( Actor actor, Property::Map map, KeyFrames keyFrames, Animation::Interpolation interpolation );
 
@@ -195,27 +198,27 @@ public:
    * @param[in] path The path for the property animator
    * @param[in] forward The forward vector for the property animator
    *
-   * This will add the property animator to the list of animators related to this transition
+   * This will parse the property animator map and add the layout data element to the array of layout data elements related to this transition
    */
   void AddPropertyAnimator( Actor actor, Property::Map map, Path path, Vector3 forward );
 
   /**
-   * @brief Convert the transition property animators to the layout data elements
+   * @brief Collect the transition layout data elements
    * @param[in] actor The actor the transition property animators are applied to
    * @param[in] layoutData The layout data containing layout data elements array for the layout update
    *
-   * This will parse the property animators and add the layout data elements to the layout data elements array
+   * This will copy the transition layout data elements to the layout data elements array
    */
-  void ConvertToLayoutDataElements( Actor, LayoutData& layoutData );
+  void CollectLayoutDataElements( Actor, LayoutData& layoutData );
 
   /**
-   * @brief Convert the transition children property animators to the layout data elements
+   * @brief Collect the transition children layout data elements
    * @param[in] actor The actor the transition property animators are applied to
    * @param[in] layoutData The layout data containing layout data elements array for the layout update
    *
-   * This will parse the children property animators and add the layout data elements to the layout data elements array
+   * This will copy the children transition layout data elements to the layout data elements array
    */
-  static void ConvertChildrenAnimatorsToLayoutDataElements( Actor, LayoutData& layoutData );
+  static void CollectChildrenLayoutDataElements( Actor, LayoutData& layoutData );
 
   /**
    * @copydoc Dali::Toolkit::LayoutTransitionData::FinishedSignal()
@@ -228,6 +231,11 @@ public:
    */
   void EmitSignalFinish( int layoutTransitionType );
 
+  /**
+   * @brief Check if one of the layout data elements has updateMeasuredSize flag set
+   */
+  bool HasUpdateMeasuredSize();
+
 private:
   /**
    * @brief Convert the property animator data to the layout data animator
@@ -235,9 +243,9 @@ private:
    * @param[in] propertyAnimator The property animator
    * @param[in] layoutAnimator The layout animator
    *
-   * This will parse the property animator data and add the layout data element animator
+   * This will parse the property animator map and add the layout data element animator to the layout animators array
    */
-  static bool ConvertToLayoutAnimator( const Property::Map& animatorData, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutAnimator );
+  bool ConvertToLayoutAnimator( const Property::Map& animatorData, const PropertyAnimator& propertyAnimator, LayoutDataAnimator& layoutAnimator );
 
   /**
    * @brief Convert the property animator to the layout data element
@@ -245,11 +253,15 @@ private:
    * @param[in] layoutDataElement The layout data element
    * @param[in] layoutDataElement The layout data
    *
-   * This will parse the children property animators and add the layout data elements to the layout data elements array
+   * This will parse the property animator map and add the layout data element to the layout data elements array
    */
-  static bool ConvertToLayoutDataElement( const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement, LayoutData& layoutData );
+  bool ConvertToLayoutDataElement( const PropertyAnimator& propertyAnimator, LayoutDataElement& layoutDataElement );
 
-  PropertyAnimatorArray mPropertyAnimators;
+  void UpdateAnimatorsIndices();
+
+  bool mUpdateMeasuredSize;
+  LayoutAnimatorArray mLayoutAnimators;
+  LayoutDataArray mLayoutDataElements;
 
   /**
    * Ref counted object - Only allow construction via New().
@@ -271,23 +283,25 @@ using LayoutDataArray = std::vector< LayoutDataElement >;
 
 struct LayoutData
 {
-  LayoutData( LayoutTransition& layoutTransition, LayoutPositionDataArray& layoutPositionDataArray, LayoutDataArray& layoutDataArray,
-      LayoutAnimatorArray& layoutAnimatorArray, PropertyAnimatorArray& childrenPropertyAnimators )
+  LayoutData( LayoutTransition& layoutTransition, LayoutPositionDataArray& layoutPositionDataArray, LayoutAnimatorArray& layoutAnimatorArray,
+      LayoutDataArray& layoutDataArray, LayoutDataArray& childrenLayoutDataArray )
   : speculativeLayout( false ),
+    updateMeasuredSize( false ),
     layoutTransition( layoutTransition ),
     layoutPositionDataArray( layoutPositionDataArray ),
-    layoutDataArray( layoutDataArray),
     layoutAnimatorArray( layoutAnimatorArray ),
-    childrenPropertyAnimators( childrenPropertyAnimators )
+    layoutDataArray( layoutDataArray),
+    childrenLayoutDataArray( childrenLayoutDataArray )
   {
   };
 
   bool speculativeLayout;
+  bool updateMeasuredSize;
   LayoutTransition& layoutTransition;
   LayoutPositionDataArray& layoutPositionDataArray;
-  LayoutDataArray& layoutDataArray;
   LayoutAnimatorArray& layoutAnimatorArray;
-  PropertyAnimatorArray& childrenPropertyAnimators;
+  LayoutDataArray& layoutDataArray;
+  LayoutDataArray& childrenLayoutDataArray;
 };
 
 } //namespace Internal
index 4f9876c..f97a8ea 100755 (executable)
@@ -555,6 +555,7 @@ struct Engine::Impl
    * @param[in,out] numberOfLines The number of laid-out lines.
    * @param[in] penY The vertical layout position.
    * @param[in] currentParagraphDirection The current paragraph's direction.
+   * @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
    *
    * return Whether the line is ellipsized.
    */
@@ -565,14 +566,17 @@ struct Engine::Impl
                      Vector2* glyphPositionsBuffer,
                      Length& numberOfLines,
                      float penY,
-                     CharacterDirection currentParagraphDirection )
+                     CharacterDirection currentParagraphDirection,
+                     bool& isAutoScrollEnabled )
   {
-    const bool ellipsis = ( ( penY - layout.descender > layoutParameters.boundingBox.height ) ||
-                            ( ( mLayout == SINGLE_LINE_BOX ) &&
-                              ( layout.extraBearing + layout.length + layout.extraWidth > layoutParameters.boundingBox.width ) ) );
+    const bool ellipsis = isAutoScrollEnabled ? ( penY - layout.descender > layoutParameters.boundingBox.height ) :
+                                                ( ( penY - layout.descender > layoutParameters.boundingBox.height ) ||
+                                                  ( ( mLayout == SINGLE_LINE_BOX ) &&
+                                                  ( layout.extraBearing + layout.length + layout.extraWidth > layoutParameters.boundingBox.width ) ) );
 
     if( ellipsis )
     {
+      isAutoScrollEnabled = false;
       // Do not layout more lines if ellipsis is enabled.
 
       // The last line needs to be completely filled with characters.
@@ -791,7 +795,8 @@ struct Engine::Impl
                    Vector<Vector2>& glyphPositions,
                    Vector<LineRun>& lines,
                    Size& layoutSize,
-                   bool elideTextEnabled )
+                   bool elideTextEnabled,
+                   bool& isAutoScrollEnabled )
   {
     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->LayoutText\n" );
     DALI_LOG_INFO( gLogFilter, Debug::Verbose, "  box size %f, %f\n", layoutParameters.boundingBox.width, layoutParameters.boundingBox.height );
@@ -925,7 +930,8 @@ struct Engine::Impl
                                  glyphPositionsBuffer,
                                  numberOfLines,
                                  penY,
-                                 currentParagraphDirection );
+                                 currentParagraphDirection,
+                                 isAutoScrollEnabled );
       }
 
       if( ellipsis )
@@ -1291,13 +1297,15 @@ bool Engine::LayoutText( const Parameters& layoutParameters,
                          Vector<Vector2>& glyphPositions,
                          Vector<LineRun>& lines,
                          Size& layoutSize,
-                         bool elideTextEnabled )
+                         bool elideTextEnabled,
+                         bool& isAutoScrollEnabled )
 {
   return mImpl->LayoutText( layoutParameters,
                             glyphPositions,
                             lines,
                             layoutSize,
-                            elideTextEnabled );
+                            elideTextEnabled,
+                            isAutoScrollEnabled );
 }
 
 void Engine::ReLayoutRightToLeftLines( const Parameters& layoutParameters,
index 5e80d8c..58466a9 100755 (executable)
@@ -108,6 +108,7 @@ public:
    * @param[out] lines The laid-out lines.
    * @param[out] layoutSize The size of the text after it has been laid-out.
    * @param[in] elideTextEnabled Whether the text elide is enabled.
+   * @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
    *
    * @return \e true if the text has been re-laid-out. \e false means the given width is too small to layout even a single character.
    */
@@ -115,7 +116,8 @@ public:
                    Vector<Vector2>& glyphPositions,
                    Vector<LineRun>& lines,
                    Size& layoutSize,
-                   bool elideTextEnabled );
+                   bool elideTextEnabled,
+                   bool& isAutoScrollEnabled );
 
   /**
    * @brief Re-lays out those lines with right to left characters.
index 6c1bf75..6849f33 100755 (executable)
@@ -2250,7 +2250,6 @@ Controller::UpdateTextType Controller::Relayout( const Size& size, Dali::LayoutD
 
   UpdateTextType updateTextType = NONE_UPDATED;
 
-  mImpl->mLayoutDirection = layoutDirection;
   if( ( size.width < Math::MACHINE_EPSILON_1000 ) || ( size.height < Math::MACHINE_EPSILON_1000 ) )
   {
     if( 0u != mImpl->mModel->mVisualModel->mGlyphPositions.Count() )
@@ -2318,6 +2317,22 @@ Controller::UpdateTextType Controller::Relayout( const Size& size, Dali::LayoutD
     mImpl->mTextUpdateInfo.mCharacterIndex = 0u;
   }
 
+  if( mImpl->mModel->mMatchSystemLanguageDirection  && mImpl->mLayoutDirection != layoutDirection )
+  {
+    // Clear the update info. This info will be set the next time the text is updated.
+    mImpl->mTextUpdateInfo.mClearAll = true;
+    // Apply modifications to the model
+    // Shape the text again is needed because characters like '()[]{}' have to be mirrored and the glyphs generated again.
+    mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending |
+                                                             GET_GLYPH_METRICS         |
+                                                             SHAPE_TEXT                |
+                                                             UPDATE_DIRECTION          |
+                                                             LAYOUT                    |
+                                                             BIDI_INFO                 |
+                                                             REORDER );
+    mImpl->mLayoutDirection = layoutDirection;
+  }
+
   // Make sure the model is up-to-date before layouting.
   ProcessModifyEvents();
   bool updated = mImpl->UpdateModel( mImpl->mOperationsPending );
@@ -2328,6 +2343,7 @@ Controller::UpdateTextType Controller::Relayout( const Size& size, Dali::LayoutD
                         mImpl->mOperationsPending,
                         layoutSize ) || updated;
 
+
   if( updated )
   {
     updateTextType = MODEL_UPDATED;
@@ -3601,12 +3617,15 @@ bool Controller::DoRelayout( const Size& size,
     }
 
     // Update the visual model.
+    bool isAutoScrollEnabled = mImpl->mIsAutoScrollEnabled;
     Size newLayoutSize;
     viewUpdated = mImpl->mLayoutEngine.LayoutText( layoutParameters,
                                                    glyphPositions,
                                                    mImpl->mModel->mVisualModel->mLines,
                                                    newLayoutSize,
-                                                   elideTextEnabled );
+                                                   elideTextEnabled,
+                                                   isAutoScrollEnabled );
+    mImpl->mIsAutoScrollEnabled = isAutoScrollEnabled;
 
     viewUpdated = viewUpdated || ( newLayoutSize != layoutSize );
 
diff --git a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
new file mode 100644 (file)
index 0000000..11f2f24
--- /dev/null
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/stage.h>
+#include <dali/devel-api/common/stage-devel.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
+#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
+#include <dali-toolkit/internal/visuals/visual-string-constants.h>
+#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
+#include <dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+namespace
+{
+
+const Dali::Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
+
+} // unnamed namespace
+
+AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties )
+{
+  AnimatedVectorImageVisualPtr visual( new AnimatedVectorImageVisual( factoryCache, shaderFactory, imageUrl ) );
+  visual->SetProperties( properties );
+
+  return visual;
+}
+
+AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl )
+{
+  AnimatedVectorImageVisualPtr visual( new AnimatedVectorImageVisual( factoryCache, shaderFactory, imageUrl ) );
+
+  return visual;
+}
+
+AnimatedVectorImageVisual::AnimatedVectorImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl )
+: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+  mImageVisualShaderFactory( shaderFactory ),
+  mUrl( imageUrl ),
+  mVisualSize(),
+  mPlacementActor(),
+  mVectorRasterizeThread(),
+  mActionStatus( DevelAnimatedVectorImageVisual::Action::STOP )
+{
+  // the rasterized image is with pre-multiplied alpha format
+  mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
+}
+
+AnimatedVectorImageVisual::~AnimatedVectorImageVisual()
+{
+}
+
+void AnimatedVectorImageVisual::GetNaturalSize( Vector2& naturalSize )
+{
+  naturalSize = mVisualSize;
+}
+
+void AnimatedVectorImageVisual::DoCreatePropertyMap( Property::Map& map ) const
+{
+  map.Clear();
+  map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE );
+  if( mUrl.IsValid() )
+  {
+    map.Insert( Toolkit::ImageVisual::Property::URL, mUrl.GetUrl() );
+  }
+}
+
+void AnimatedVectorImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
+{
+  // Do nothing
+}
+
+void AnimatedVectorImageVisual::DoSetProperties( const Property::Map& propertyMap )
+{
+  // url already passed in from constructor
+  for( Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter )
+  {
+    KeyValuePair keyValue = propertyMap.GetKeyValue( iter );
+    if( keyValue.first.type == Property::Key::INDEX )
+    {
+      DoSetProperty( keyValue.first.indexKey, keyValue.second );
+    }
+  }
+}
+
+void AnimatedVectorImageVisual::DoSetProperty( Property::Index index, const Property::Value& value )
+{
+}
+
+void AnimatedVectorImageVisual::DoSetOnStage( Actor& actor )
+{
+  Shader shader;
+
+  if( mImpl->mCustomShader )
+  {
+    shader = Shader::New( mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource() : mImpl->mCustomShader->mVertexShader,
+                          mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource() : mImpl->mCustomShader->mFragmentShader,
+                          mImpl->mCustomShader->mHints );
+
+    shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
+  }
+  else
+  {
+    shader = mImageVisualShaderFactory.GetShader( mFactoryCache, false, true );
+  }
+
+  Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
+
+  mImpl->mRenderer = Renderer::New( geometry, shader );
+
+  TextureSet textureSet = TextureSet::New();
+  mImpl->mRenderer.SetTextures( textureSet );
+
+  // Register transform properties
+  mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
+
+  // Defer the rasterisation task until we get given a size (by Size Negotiation algorithm)
+
+  // Hold the weak handle of the placement actor and delay the adding of renderer until the rasterization is finished.
+  mPlacementActor = actor;
+
+  // This visual needs it's size set before it can be rasterized hence set ResourceReady once on stage
+  ResourceReady( Toolkit::Visual::ResourceStatus::READY );
+}
+
+void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
+{
+  if( mVectorRasterizeThread )
+  {
+    mVectorRasterizeThread->PauseAnimation();
+    DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
+    mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+  }
+
+  if( mImpl->mRenderer )
+  {
+    actor.RemoveRenderer( mImpl->mRenderer );
+    mImpl->mRenderer.Reset();
+  }
+
+  mPlacementActor.Reset();
+
+  // Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
+  mVisualSize = Vector2::ZERO;
+}
+
+void AnimatedVectorImageVisual::OnSetTransform()
+{
+  Vector2 visualSize = mImpl->mTransform.GetVisualSize( mImpl->mControlSize );
+
+  if( IsOnStage() )
+  {
+    if( visualSize != mVisualSize )
+    {
+      mVisualSize = visualSize;
+
+      if( !mVectorRasterizeThread )
+      {
+        uint32_t width = static_cast< uint32_t >( visualSize.width );
+        uint32_t height = static_cast< uint32_t >( visualSize.height );
+
+        mVectorRasterizeThread = std::unique_ptr< VectorRasterizeThread >( new VectorRasterizeThread( mUrl.GetUrl(), mImpl->mRenderer, width, height ) );
+
+        mVectorRasterizeThread->SetResourceReadyCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnResourceReady ) ) );
+        mVectorRasterizeThread->Start();
+
+        if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+        {
+          mVectorRasterizeThread->StartAnimation();
+          DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::CONTINUOUSLY );
+        }
+        else
+        {
+          // Render one frame
+          mVectorRasterizeThread->RenderFrame();
+        }
+      }
+      else
+      {
+        // TODO: change size
+      }
+    }
+  }
+}
+
+void AnimatedVectorImageVisual::OnDoAction( const Property::Index actionId, const Property::Value& attributes )
+{
+  if( actionId == mActionStatus )
+  {
+    return;
+  }
+
+  // Check if action is valid for this visual type and perform action if possible
+  switch( actionId )
+  {
+    case DevelAnimatedVectorImageVisual::Action::PLAY:
+    {
+      if( IsOnStage())
+      {
+        if( mVectorRasterizeThread )
+        {
+          mVectorRasterizeThread->StartAnimation();
+          DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::CONTINUOUSLY );   //TODO: Should manage this globally
+        }
+      }
+      mActionStatus = DevelAnimatedVectorImageVisual::Action::PLAY;
+      break;
+    }
+    case DevelAnimatedVectorImageVisual::Action::PAUSE:
+    {
+      if( mVectorRasterizeThread )
+      {
+        mVectorRasterizeThread->PauseAnimation();
+        DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
+      }
+      mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+      break;
+    }
+    case DevelAnimatedVectorImageVisual::Action::RESUME:
+    {
+      if( mVectorRasterizeThread )
+      {
+        mVectorRasterizeThread->ResumeAnimation();
+        DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::CONTINUOUSLY );
+      }
+      mActionStatus = DevelAnimatedVectorImageVisual::Action::RESUME;
+      break;
+    }
+    case DevelAnimatedVectorImageVisual::Action::STOP:
+    {
+      if( mVectorRasterizeThread )
+      {
+        mVectorRasterizeThread->StopAnimation();
+        DevelStage::SetRenderingBehavior( Stage::GetCurrent(), DevelStage::Rendering::IF_REQUIRED );
+      }
+      mActionStatus = DevelAnimatedVectorImageVisual::Action::STOP;
+      break;
+    }
+  }
+}
+
+void AnimatedVectorImageVisual::OnResourceReady()
+{
+  // If weak handle is holding a placement actor, it is the time to add the renderer to actor.
+  Actor actor = mPlacementActor.GetHandle();
+  if( actor )
+  {
+    actor.AddRenderer( mImpl->mRenderer );
+    // reset the weak handle so that the renderer only get added to actor once
+    mPlacementActor.Reset();
+
+    Stage::GetCurrent().KeepRendering( 0.0f );
+  }
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h
new file mode 100644 (file)
index 0000000..33c46b6
--- /dev/null
@@ -0,0 +1,174 @@
+#ifndef DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
+#define DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/object/weak-handle.h>
+#include <memory>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/internal/visuals/visual-url.h>
+#include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+class ImageVisualShaderFactory;
+class VectorRasterizeThread;
+class AnimatedVectorImageVisual;
+using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >;
+
+/**
+ * The visual which renders an animated vector image using VectorAnimationRenderer.
+ * VectorAnimationRenderer renders the animation image and this visuall controls the images.
+ *
+ * The following property is essential
+ *
+ * | %Property Name           | Type             |
+ * |--------------------------|------------------|
+ * | url                      | STRING           |
+ *
+ */
+class AnimatedVectorImageVisual: public Visual::Base
+{
+public:
+
+  /**
+   * @brief Create the AnimatedVectorImageVisual using the image URL.
+   *
+   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+   * @param[in] shaderFactory The ImageVisualShaderFactory object
+   * @param[in] imageUrl The URL to an animated vector image to use
+   * @param[in] properties A Property::Map containing settings for this visual
+   * @return A smart-pointer to the newly allocated visual.
+   */
+  static AnimatedVectorImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties );
+
+  /**
+   * @brief Create the AnimatedVectorImageVisual using the image URL.
+   *
+   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+   * @param[in] shaderFactory The ImageVisualShaderFactory object
+   * @param[in] imageUrl The URL to an animated vector image to use
+   * @return A smart-pointer to the newly allocated visual.
+   */
+  static AnimatedVectorImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
+
+public:  // from Visual
+
+  /**
+   * @copydoc Visual::Base::GetNaturalSize
+   */
+  virtual void GetNaturalSize( Vector2& naturalSize ) override;
+
+  /**
+   * @copydoc Visual::Base::CreatePropertyMap
+   */
+  virtual void DoCreatePropertyMap( Property::Map& map ) const override;
+
+  /**
+   * @copydoc Visual::Base::CreateInstancePropertyMap
+   */
+  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+
+protected:
+
+  /**
+   * @brief Constructor.
+   *
+   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+   * @param[in] shaderFactory The ImageVisualShaderFactory object
+   * @param[in] imageUrl The URL to an animated vector image to use
+   */
+  AnimatedVectorImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
+
+  /**
+   * @brief A reference counted object may only be deleted by calling Unreference().
+   */
+  virtual ~AnimatedVectorImageVisual();
+
+  /**
+   * @copydoc Visual::Base::DoSetProperties
+   */
+  virtual void DoSetProperties( const Property::Map& propertyMap ) override;
+
+  /**
+   * @copydoc Visual::Base::DoSetOnStage
+   */
+  virtual void DoSetOnStage( Actor& actor ) override;
+
+  /**
+   * @copydoc Visual::Base::DoSetOffStage
+   */
+  virtual void DoSetOffStage( Actor& actor ) override;
+
+  /**
+   * @copydoc Visual::Base::OnSetTransform
+   */
+  virtual void OnSetTransform() override;
+
+  /**
+   * @copydoc Visual::Base::OnDoAction
+   */
+  virtual void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+
+private:
+
+  /**
+   * Helper method to set individual values by index key.
+   * @param[in] index The index key of the value
+   * @param[in] value The value
+   */
+  void DoSetProperty( Property::Index index, const Property::Value& value );
+
+  /**
+   * @brief Event callback from rasterize thread. This is called after the first frame is ready.
+   */
+  void OnResourceReady();
+
+  // Undefined
+  AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete;
+
+  // Undefined
+  AnimatedVectorImageVisual& operator=( const AnimatedVectorImageVisual& visual ) = delete;
+
+private:
+  ImageVisualShaderFactory&                    mImageVisualShaderFactory;
+  VisualUrl                                    mUrl;
+  Vector2                                      mVisualSize;
+  WeakHandle< Actor >                          mPlacementActor;
+  std::unique_ptr< VectorRasterizeThread >     mVectorRasterizeThread;
+  DevelAnimatedVectorImageVisual::Action::Type mActionStatus;
+};
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_INTERNAL_ANIMATED_VECTOR_IMAGE_VISUAL_H
diff --git a/dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.cpp b/dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.cpp
new file mode 100644 (file)
index 0000000..50bf304
--- /dev/null
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/thread-settings.h>
+#include <dali/integration-api/adaptors/adaptor.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gVectorAnimationLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_VECTOR_ANIMATION" );
+#endif
+
+} // unnamed namespace
+
+VectorRasterizeThread::VectorRasterizeThread( const std::string& url, Renderer renderer, uint32_t width, uint32_t height )
+: mUrl( url ),
+  mVectorRenderer(),
+  mResourceReadyTrigger( NULL ),
+  mCurrentFrame( 0 ),
+  mTotalFrame( 0 ),
+  mWidth( width ),
+  mHeight( height ),
+  mNeedRender( false ),
+  mPlaying( false ),
+  mPaused( false ),
+  mDestroyThread( false ),
+  mResourceReady( false ),
+  mLogFactory( Dali::Adaptor::Get().GetLogFactory() )
+{
+  mVectorRenderer = VectorAnimationRenderer::New( mUrl, renderer, width, height );
+}
+
+VectorRasterizeThread::~VectorRasterizeThread()
+{
+  // Stop the thread
+  {
+    ConditionalWait::ScopedLock lock( mConditionalWait );
+    mDestroyThread = true;
+    mConditionalWait.Notify( lock );
+
+    // This should be called in the main thread to stop waiting for the dequeuable buffer.
+    mVectorRenderer.StopRender();
+  }
+
+  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::~VectorRasterizeThread: Join\n" );
+
+  Join();
+
+  delete mResourceReadyTrigger;
+}
+
+void VectorRasterizeThread::Run()
+{
+  SetThreadName( "VectorImageThread" );
+  mLogFactory.InstallLogFunction();
+
+  //TODO: check the return value
+  StartRender();
+
+  while( IsThreadReady() )
+  {
+    Rasterize();
+  }
+}
+
+void VectorRasterizeThread::StartAnimation()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+  if( !mPlaying )
+  {
+    mPlaying = true;
+    mPaused = false;
+    mConditionalWait.Notify( lock );
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StartAnimation: Start\n" );
+  }
+}
+
+void VectorRasterizeThread::StopAnimation()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+  if( mPlaying )
+  {
+    mPlaying = false;
+    mPaused = false;
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StopAnimation: Stop\n" );
+  }
+}
+
+void VectorRasterizeThread::PauseAnimation()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+  if( mPlaying && !mPaused )
+  {
+    mPaused = true;
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PauseAnimation: Pause\n" );
+  }
+}
+
+void VectorRasterizeThread::ResumeAnimation()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+  if( mPlaying && mPaused )
+  {
+    mPaused = false;
+    mConditionalWait.Notify( lock );
+
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::ResumeAnimation: Resume\n" );
+  }
+}
+
+void VectorRasterizeThread::RenderFrame()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+  mNeedRender = true;
+  mConditionalWait.Notify( lock );
+
+  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::RenderFrame: Render\n" );
+}
+
+void VectorRasterizeThread::SetResourceReadyCallback( EventThreadCallback* callback )
+{
+  mResourceReadyTrigger = callback;
+}
+
+bool VectorRasterizeThread::IsThreadReady()
+{
+  ConditionalWait::ScopedLock lock( mConditionalWait );
+
+  if( ( !mPlaying || mPaused ) && !mNeedRender && !mDestroyThread )
+  {
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::IsThreadReady: Wait\n" );
+
+    if( !mPlaying )
+    {
+      mCurrentFrame = 0;
+    }
+
+    mConditionalWait.Wait( lock );
+  }
+
+  // Keep the thread alive if this thread is NOT to be destroyed
+  return !mDestroyThread;
+}
+
+bool VectorRasterizeThread::StartRender()
+{
+  //TODO: check the return value
+  mVectorRenderer.StartRender();
+
+  mTotalFrame = mVectorRenderer.GetTotalFrameNumber();
+
+  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StartRender: Renderer is started [%d]\n", mTotalFrame );
+
+  return true;
+}
+
+void VectorRasterizeThread::Rasterize()
+{
+  DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: [%d]\n", mCurrentFrame );
+
+  // Rasterize
+  mVectorRenderer.Render( mCurrentFrame );
+
+  if( mPlaying && !mPaused )
+  {
+    mCurrentFrame++;
+
+    if( mCurrentFrame >= mTotalFrame )
+    {
+      mCurrentFrame = 0;
+    }
+  }
+
+  mNeedRender = false;
+
+  if( !mResourceReady )
+  {
+    DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Resource ready trigger\n" );
+
+    mResourceReadyTrigger->Trigger();
+    mResourceReady = true;
+  }
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.h b/dali-toolkit/internal/visuals/animated-vector-image/vector-image-rasterize-thread.h
new file mode 100644 (file)
index 0000000..05a5bba
--- /dev/null
@@ -0,0 +1,149 @@
+#ifndef DALI_TOOLKIT_VECTOR_IMAGE_RASTERIZE_THREAD_H
+#define DALI_TOOLKIT_VECTOR_IMAGE_RASTERIZE_THREAD_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
+#include <dali/devel-api/adaptor-framework/vector-animation-renderer.h>
+#include <dali/devel-api/threading/conditional-wait.h>
+#include <dali/devel-api/threading/mutex.h>
+#include <dali/devel-api/threading/thread.h>
+#include <dali/integration-api/adaptors/log-factory-interface.h>
+#include <string>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+/**
+ * The worker thread for vector image rasterization.
+ */
+class VectorRasterizeThread : public Thread
+{
+public:
+
+  /**
+   * @brief Constructor.
+   *
+   * @param[in] url The url of the vector animation file
+   * @param[in] renderer The renderer used to render the image
+   * @param[in] width The width of the content
+   * @param[in] height The height of the content
+   */
+  VectorRasterizeThread( const std::string& url, Renderer renderer, uint32_t width, uint32_t height );
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~VectorRasterizeThread();
+
+  /**
+   * @brief Play the vector animation
+   */
+  void StartAnimation();
+
+  /**
+   * @brief Stop the vector animation
+   */
+  void StopAnimation();
+
+  /**
+   * @brief Pause the vector animation
+   */
+  void PauseAnimation();
+
+  /**
+   * @brief Resume the vector animation
+   */
+  void ResumeAnimation();
+
+  /**
+   * @brief Render one frame. The current frame number will be increased.
+   */
+  void RenderFrame();
+
+  /**
+   * @brief This callback is called after the first frame is ready.
+   * @param callback The resource ready callback
+   */
+  void SetResourceReadyCallback( EventThreadCallback* callback );
+
+protected:
+
+  /**
+   * @brief The entry function of the worker thread.
+   *        It rasterizes the vector image.
+   */
+  void Run() override;
+
+private:
+
+  /**
+   * @brief Called by the rasterize thread which ensures a wait if required.
+   * @return false if the thread should stop.
+   */
+  bool IsThreadReady();
+
+  /**
+   * @brief Start rendering
+   */
+  bool StartRender();
+
+  /**
+   * @brief Rasterize the current frame.
+   */
+  void Rasterize();
+
+  // Undefined
+  VectorRasterizeThread( const VectorRasterizeThread& thread ) = delete;
+
+  // Undefined
+  VectorRasterizeThread& operator=( const VectorRasterizeThread& thread ) = delete;
+
+private:
+
+  std::string                mUrl;
+  VectorAnimationRenderer    mVectorRenderer;
+  ConditionalWait            mConditionalWait;
+  Dali::Mutex                mMutex;
+  EventThreadCallback*       mResourceReadyTrigger;
+  uint32_t                   mCurrentFrame;
+  uint32_t                   mTotalFrame;
+  uint32_t                   mWidth;
+  uint32_t                   mHeight;
+  bool                       mNeedRender;
+  bool                       mPlaying;
+  bool                       mPaused;
+  bool                       mDestroyThread;  ///< Whether the thread be destroyed
+  bool                       mResourceReady;
+  const Dali::LogFactoryInterface& mLogFactory; ///< The log factory
+
+};
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_VECTOR_IMAGE_RASTERIZE_THREAD_H
index 4afade9..d30729b 100644 (file)
@@ -41,6 +41,7 @@
 #include <dali-toolkit/internal/visuals/svg/svg-visual.h>
 #include <dali-toolkit/internal/visuals/text/text-visual.h>
 #include <dali-toolkit/internal/visuals/animated-image/animated-image-visual.h>
+#include <dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h>
 #include <dali-toolkit/internal/visuals/wireframe/wireframe-visual.h>
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
@@ -161,6 +162,11 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
                 visualPtr = AnimatedImageVisual::New( GetFactoryCache(), GetImageVisualShaderFactory(), visualUrl, propertyMap );
                 break;
               }
+              case VisualUrl::JSON:
+              {
+                visualPtr = AnimatedVectorImageVisual::New( GetFactoryCache(),  GetImageVisualShaderFactory(), imageUrl, propertyMap );
+                break;
+              }
               case VisualUrl::REGULAR_IMAGE:
               {
                 visualPtr = ImageVisual::New( GetFactoryCache(), GetImageVisualShaderFactory(), visualUrl, propertyMap );
@@ -254,6 +260,17 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
       visualPtr = AnimatedGradientVisual::New( GetFactoryCache(), propertyMap );
       break;
     }
+
+    case Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE:
+    {
+      Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
+      std::string imageUrl;
+      if( imageURLValue && imageURLValue->Get( imageUrl ) )
+      {
+        visualPtr = AnimatedVectorImageVisual::New( GetFactoryCache(),  GetImageVisualShaderFactory(), imageUrl, propertyMap );
+      }
+      break;
+    }
   }
 
   if( !visualPtr )
@@ -321,6 +338,11 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const std::string& url, Image
         visualPtr = AnimatedImageVisual::New( GetFactoryCache(), GetImageVisualShaderFactory(), visualUrl );
         break;
       }
+      case VisualUrl::JSON:
+      {
+        visualPtr = AnimatedVectorImageVisual::New( GetFactoryCache(),  GetImageVisualShaderFactory(), visualUrl );
+        break;
+      }
       case VisualUrl::REGULAR_IMAGE:
       {
         visualPtr = ImageVisual::New(GetFactoryCache(), GetImageVisualShaderFactory(), visualUrl, size );
index ad5b4ae..9257a74 100644 (file)
@@ -44,6 +44,7 @@ DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, SVG )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, ANIMATED_IMAGE )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, WIREFRAME )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, ANIMATED_GRADIENT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, ANIMATED_VECTOR_IMAGE )
 DALI_ENUM_TO_STRING_TABLE_END( VISUAL_TYPE )
 
 // Visual Type
index b1f5f3e..731ed20 100644 (file)
@@ -99,8 +99,10 @@ VisualUrl::Type ResolveType( const std::string& url )
     enum { SUFFIX, HASH, HASH_DOT } state = SUFFIX;
     char SVG[ 4 ] = { 'g', 'v', 's', '.' };
     char GIF[ 4 ] = { 'f', 'i', 'g', '.' };
+    char JSON[ 5 ] = { 'n', 'o', 's', 'j', '.' };
     unsigned int svgScore = 0;
     unsigned int gifScore = 0;
+    unsigned int jsonScore = 0;
     int index = count;
     while( --index >= 0 )
     {
@@ -122,6 +124,14 @@ VisualUrl::Type ResolveType( const std::string& url )
           return VisualUrl::GIF;
         }
       }
+      if( ( offsetFromEnd < sizeof(JSON) )&&( currentChar == JSON[ offsetFromEnd ] ) )
+      {
+        // early out if JSON as can't be used in N patch for now
+        if( ++jsonScore == sizeof(JSON) )
+        {
+          return VisualUrl::JSON;
+        }
+      }
       switch( state )
       {
         case SUFFIX:
index aac605c..f3af2e0 100644 (file)
@@ -40,7 +40,8 @@ public:
     REGULAR_IMAGE,
     N_PATCH,
     SVG,
-    GIF
+    GIF,
+    JSON
   };
 
   enum ProtocolType
index 6ab69a5..aea1103 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 3;
-const unsigned int TOOLKIT_MICRO_VERSION = 50;
+const unsigned int TOOLKIT_MICRO_VERSION = 51;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index aa253df..c7b88f6 100644 (file)
@@ -79,9 +79,6 @@
  + [Visual Debug Rendering](@ref debugrendering)
  + [Stagehand - DALi Visual Debugger](@ref stagehand)
 
-### Viewing Modes
- + [Overview](@ref viewing-modes)
-
 ### Extending DALi
  + [How to write Custom UI Components](@ref creating-custom-controls)
   + [Size Negotiation for Controls](@ref size-negotiation-controls)
diff --git a/docs/content/programming-guide/viewing-modes.h b/docs/content/programming-guide/viewing-modes.h
deleted file mode 100644 (file)
index f2cad16..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*! \page viewing-modes Viewing modes
- *
- *
- * <h2 class="pg">Introduction</h2>
- *
- * DALi supports multiple viewing modes: <br>
-* <ul>
-*  <li>MONO <br>
-*  <li>STEREO_HORIZONTAL <br>
-*  <li>STEREO_VERTICAL <br>
-* </ul>
-* MONO is the default viewing mode. When using MONO mode, only one image of the scene is produced in every update. In this  setup, DALi will create a default render task, which will render everything added to the stage root layer, and one default camera for that render task.<br><br>
-* STEREO_HORIZONTAL and STEREO_VERTICAL allow the application to produce stereo images. Stereo rendering techniques produce two images of the scene with an slight offset between them which will be presented to the left and the right eye independently. In this setup, DALi will create two additional render tasks, one for the right eye and one for the left, each with it's own camera. Those cameras will be parented to the default camera. The method to generate the projection transformation for each camera is known as "parallel axis asymmetric frustum perspective projection" and is illustrated in the image below.<br><br>
-
-* \image html viewing-modes/stereo-projection.png
-
-* <br>The separation between the two cameras is configurable, but, typically, it should range between 50 and 70 millimeters. Too large a separation can be hard to resolve and is known as hyperstereo. The convergence plane for both frustums is the 2D plane, so, the projection of anything lying in the 2D plane will be coincident for both left and right eyes, hence zero parallax. Objects that lie in front of the projection plane will appear to be in front of the screen and object behind the projection plane will appear to be "into" the screen. Object behind the projection plane ( positive parallax ) are easier to look and minimises eye strain.<br>
-
- * In order to view stereoscopic images correctly, each image must be presented to each eye independently. There exist devices in the market for this, like head-mounted displays, which is a display device, worn in the head, that have two small displays, one for each eye. A cheaper alternative to this often expensive devices is Google's cardboard viewer.<br>
- * \image html viewing-modes/google-cardboard.png
- *<br>With Google cardboard, or some similar device, you can transform your phone into a basic virtual reality headset.
- *
- * <h2 class="pg">Stereoscopic rendering in DALi</h2>
- * STEREO_HORIZONTAL mode will present the left image on the top half of the screen and the right image on the bottom half. It is intended  to be used in landspace orientation, so the images are rotated 90 degrees counterclockwise. STEREO_VERTICAL mode, on the other hand, will render the left image on the left half of the screen and the right image on the right side.<br><br>
-*
-*To define the viewing mode to be used, applications can use the function Dali::Application::SetViewMode defined in the Application class, passing as the parameter which mode to use. It is possible for an application to query which view mode is being used by calling the funcion Dali::Application::GetViewMode. To define the separation between the left and right cameras, the application can use the function Dali::Application::SetStereoBase, passing as a parameter the distance in millimeters. This distance can be queried using Dali::Application::GetStereoBase.<br>
-*It is also possible to set the viewing mode and offset at initialization time using two command-line arguments for this purpose: --view-mode ( or -v ) and 0 for MONO, 1 for STEREO_HORIZONTAL, 2 for STEREO_VERTICAL, and --stereo-base ( or --s ) and the separation in millimeters.<br><br>
-
-* <h2 class="pg">Considerations</h2>
-*There are a some restrictions to be aware of when writing stereoscopic applications using DALi.
-
-<ul>
-*  <li>When stereo mode is selected, the default's render task source actor will be set to an uninitialized actor so it doesn't render anything. Changing the default's render task source actor later on will produce undesired results, as you, typically, do not want to see anything rendered by the default camera when stereo mode is on.<br>
-
-*  <li>Stereo cameras are parented to the default camera, so if the application need to change camera position or orientation it will need to change the default camera transformation. The handle to the default camera can be obtained form the default render task as shown below.<br>
- * @code
- * Dali::RenderTask defaultRenderTask = Dali::Stage::GetCurrent().GetRenderTaskList().GetTask(0);
- * Dali::CameraActor defaultCamera = defaultRenderTask.GetCameraActor();
- * @endcode
-
-*  <li>Stereo render tasks will render everything added to the stage's root layer. If the application need to render any object hierarchy to an off-screen buffer, it will have to set the exclusive flag on that render task so stereo tasks doesn't render that particular subtree. To set the exclusive flag in a render task, the application can call the method Dali::RenderTask::SetExclusive defined in the render task.<br>
-*</ul>
- *
- */
index 8f750dd..0cb3e5c 100644 (file)
@@ -73,14 +73,6 @@ public:
       // 3. start the adaptor
       adaptor->Start();
 
-      // Set the view modes
-
-      if( options.stereo.viewMode > Dali::MONO )
-      {
-        adaptor->SetStereoBase( options.stereo.stereoBase );
-        adaptor->SetViewMode( options.stereo.viewMode );
-      }
-
       // fire the scene create signal
       adaptor->NotifySceneCreated();
 
index 319ca17..5ac7ff8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.3.50
+Version:    1.3.51
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT