diff --git a/test/makefile b/test/makefile index 5fdc45c4..7b242a39 100644 --- a/test/makefile +++ b/test/makefile @@ -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` diff --git a/test/testShape.cpp b/test/testShape.cpp index d1da21e7..4ee2ad7e 100644 --- a/test/testShape.cpp +++ b/test/testShape.cpp @@ -1,4 +1,5 @@ #include +#include 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(); +}