summaryrefslogtreecommitdiff
path: root/unsorted/evas/evas-vg-simple.c
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2017-10-23 11:05:34 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-10-23 11:05:38 -0700
commitaff7dd32b6bba51b791e239c320e5bba683b2202 (patch)
tree2055c8ec2279526dae9b6570c81233002b5f2a89 /unsorted/evas/evas-vg-simple.c
parentc5f408730280df8d7e1bec388e77902d80c7f591 (diff)
evas: add set function for root_node property.
Summary: Currently user ask for the root_node from the evas_vg object and then attach its tree by setting the root node as parent. With this change this process will be explicit. user has to set the root node to the evas_vg object and the object will take the ownership of the tree. User can query the current vg_tree by root_node_get api. Test Plan: Fixed the test app to reflects this change. Reviewers: jpeg, cedric Reviewed By: jpeg, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5347 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to 'unsorted/evas/evas-vg-simple.c')
-rw-r--r--unsorted/evas/evas-vg-simple.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/unsorted/evas/evas-vg-simple.c b/unsorted/evas/evas-vg-simple.c
index 3414970..111fc3e 100644
--- a/unsorted/evas/evas-vg-simple.c
+++ b/unsorted/evas/evas-vg-simple.c
@@ -309,7 +309,7 @@ _1_basic_shape_test()
309 evas_object_event_callback_add(d.vg, EVAS_CALLBACK_KEY_DOWN, _basic_shape_key_handle, NULL); 309 evas_object_event_callback_add(d.vg, EVAS_CALLBACK_KEY_DOWN, _basic_shape_key_handle, NULL);
310 puts(basic_shape_menu); 310 puts(basic_shape_menu);
311 311
312 container = evas_vg_container_add(evas_object_vg_root_node_get(d.vg)); 312 container = evas_vg_container_add(NULL);
313 313
314 // Line 314 // Line
315 shape = evas_vg_shape_add(container); 315 shape = evas_vg_shape_add(container);
@@ -406,6 +406,8 @@ _1_basic_shape_test()
406 evas_vg_node_color_set(new_shape, 0, 0, 200, 200); 406 evas_vg_node_color_set(new_shape, 0, 0, 200, 200);
407 evas_vg_node_origin_set(new_shape, 350, 450); 407 evas_vg_node_origin_set(new_shape, 350, 450);
408 d.shape_list = eina_list_append(d.shape_list, new_shape); 408 d.shape_list = eina_list_append(d.shape_list, new_shape);
409
410 evas_object_vg_root_node_set(d.vg, container);
409} 411}
410 412
411// 2. Basic shape Test Case END 413// 2. Basic shape Test Case END
@@ -487,9 +489,11 @@ _2_interpolation_test()
487 evas_vg_node_origin_set(shape, 150, 150); 489 evas_vg_node_origin_set(shape, 150, 150);
488 d.shape_list = eina_list_append(d.shape_list, shape); 490 d.shape_list = eina_list_append(d.shape_list, shape);
489 491
490 shape = evas_vg_shape_add(evas_object_vg_root_node_get(d.vg)); 492 shape = evas_vg_shape_add(NULL);
491 evas_vg_node_origin_set(shape, 150, 150); 493 evas_vg_node_origin_set(shape, 150, 150);
492 d.shape_list = eina_list_append(d.shape_list, shape); 494 d.shape_list = eina_list_append(d.shape_list, shape);
495
496 evas_object_vg_root_node_set(d.vg, shape);
493} 497}
494 498
495// 2. Interpolation Test Case END 499// 2. Interpolation Test Case END
@@ -513,11 +517,13 @@ _main_menu()
513 // create the initial screen 517 // create the initial screen
514 d.vg = evas_object_vg_add(d.evas); 518 d.vg = evas_object_vg_add(d.evas);
515 evas_object_show(d.vg); 519 evas_object_show(d.vg);
516 shape = evas_vg_shape_add(evas_object_vg_root_node_get(d.vg)); 520 shape = evas_vg_shape_add(NULL);
517 evas_vg_shape_append_svg_path(shape, batman); 521 evas_vg_shape_append_svg_path(shape, batman);
518 evas_vg_node_color_set(shape, 10, 0, 0, 10); 522 evas_vg_node_color_set(shape, 10, 0, 0, 10);
519 evas_vg_node_origin_set(shape, 0, 100); 523 evas_vg_node_origin_set(shape, 0, 100);
520 524
525 evas_object_vg_root_node_set(d.vg, shape);
526
521 _canvas_resize_cb(d.ee); 527 _canvas_resize_cb(d.ee);
522 puts(main_menu); 528 puts(main_menu);
523} 529}