lottie/vector : add a example to test the vector module. 29/188929/2
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 12 Sep 2018 02:49:12 +0000 (11:49 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 12 Sep 2018 04:17:10 +0000 (04:17 +0000)
Change-Id: I511b2b520b51ec8b9bf278b67a5ca94784af4c76

example/meson.build
example/vectortest.cpp [new file with mode: 0644]

index 72fb942..44a0f43 100644 (file)
@@ -41,3 +41,8 @@ executable('lottieviewer',
            include_directories : inc,
            link_with : lottie_player_lib,
            dependencies : demo_dep)
+
+executable('vectorTest',
+           'vectortest.cpp',
+           include_directories : inc,
+           dependencies : [library_deps])
diff --git a/example/vectortest.cpp b/example/vectortest.cpp
new file mode 100644 (file)
index 0000000..8e34f67
--- /dev/null
@@ -0,0 +1,13 @@
+#include<iostream>
+
+#include "vinterpolator.h"
+
+int main()
+{
+    VInterpolator ip({0.667, 1}, {0.333 , 0});
+    for (float i = 0.0 ; i < 1.0 ; i+=0.05) {
+        std::cout<<ip.value(i)<<"\t";
+    }
+    std::cout<<std::endl;
+    return 0;
+}