test: update test code for the first showcase.

To show the result, we use efl library.

Most linux distribution supports efl library from their package repo,
you can easily install efl from its package repo:

Ubuntu:
$ apt-get install libelementary-dev

Or, please visit efl site to install EFL libarary manually:
https://www.enlightenment.org/download

Change-Id: I696ac72e4ec7ea3258161a15b58171d74c16830d
This commit is contained in:
Hermet Park 2020-04-19 12:17:48 +09:00
parent 2628a5a935
commit 69f2fb4965
2 changed files with 27 additions and 2 deletions

View file

@ -1,2 +1,2 @@
all:
gcc -o testShape testShape.cpp -g -lstdc++ `pkg-config --cflags --libs tizenvg`
gcc -o testShape testShape.cpp -g -lstdc++ `pkg-config --cflags --libs elementary tizenvg`

View file

@ -1,4 +1,5 @@
#include <tizenvg.h>
#include <Elementary.h>
using namespace std;
@ -7,7 +8,7 @@ using namespace std;
static uint32_t buffer[WIDTH * HEIGHT];
int main(int argc, char **argv)
void tvgtest()
{
//Initialize TizenVG Engine
tvg::Engine::init();
@ -32,3 +33,27 @@ int main(int argc, char **argv)
//Terminate TizenVG Engine
tvg::Engine::term();
}
int main(int argc, char **argv)
{
tvgtest();
//Show the result using EFL...
elm_init(argc, argv);
Eo* win = elm_win_util_standard_add(NULL, "TizenVG Test");
Eo* img = evas_object_image_filled_add(evas_object_evas_get(win));
evas_object_image_size_set(img, WIDTH, HEIGHT);
evas_object_image_data_set(img, buffer);
evas_object_size_hint_weight_set(img, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(img);
elm_win_resize_object_add(win, img);
evas_object_geometry_set(win, 0, 0, WIDTH, HEIGHT);
evas_object_show(win);
elm_run();
elm_shutdown();
}