elementary_test: Add the animation view test
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 21 Aug 2019 08:53:14 +0000 (17:53 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 23 Aug 2019 08:53:40 +0000 (17:53 +0900)
Summary:
Add an animation view item to test vector animation on elementary_test.
If Evas Vg Json(Lottie) Loader is not supported,
use the vector class to output the svg file.

Depends {D9451}

Test Plan:
elementart_test
Animation View

Reviewers: Hermet, smohanty, kimcinoo, zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9472

data/elementary/images/ubuntu.svg [new file with mode: 0644]
src/bin/elementary/test_efl_ui_animation_view.c

diff --git a/data/elementary/images/ubuntu.svg b/data/elementary/images/ubuntu.svg
new file mode 100644 (file)
index 0000000..4d7b3ee
--- /dev/null
@@ -0,0 +1,26 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-70 -70 140 140">
+
+  <defs>
+    <path id="b" d="M 23,-20 A32,32 0,0,0 -23,-20 L -40,-30 A42,42 0,0,1 -14,-47 A17,17 0,0,0 14,-47 A42,42 0,0,1 40,-30 Z"/>
+    <circle id="h" cx="0" cy="-57" r="12"/>
+  </defs>
+
+  <g transform="translate(5,5)" opacity="0.125">
+    <use xlink:href="#h" transform="rotate(30)"/>
+    <use xlink:href="#b" transform="rotate(30)"/>
+    <use xlink:href="#h" transform="rotate(150)"/>
+    <use xlink:href="#b" transform="rotate(150)"/>
+    <use xlink:href="#h" transform="rotate(-90)"/>
+    <use xlink:href="#b" transform="rotate(-90)"/>
+  </g>
+
+  <a xlink:href="http://www.ubuntu.com/">
+    <use xlink:href="#h" fill="#d00" transform="rotate(30)"/>
+    <use xlink:href="#b" fill="#f40" transform="rotate(30)"/>
+    <use xlink:href="#h" fill="#f80" transform="rotate(150)"/>
+    <use xlink:href="#b" fill="#d00" transform="rotate(150)"/>
+    <use xlink:href="#h" fill="#f40" transform="rotate(-90)"/>
+    <use xlink:href="#b" fill="#f80" transform="rotate(-90)"/>
+  </a>
+
+</svg>
index 36e28c4..8d06d6a 100644 (file)
@@ -313,12 +313,12 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
            efl_pack(box, efl_added));
 
    //Create Vector object.
-   snprintf(buf, sizeof(buf), "%s/images/tiger.svg", elm_app_data_dir_get());
+   snprintf(buf, sizeof(buf), "%s/images/ubuntu.svg", elm_app_data_dir_get());
    efl_add(EFL_CANVAS_VG_OBJECT_CLASS, win,
            efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
            efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
            efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
-           efl_file_simple_load(efl_added, buf, NULL),
+           efl_file_set(efl_added, buf),
            efl_gfx_entity_visible_set(efl_added, EINA_TRUE),
            efl_pack(box, efl_added));