summaryrefslogtreecommitdiff
path: root/src/static_libs/vg_common/vg_common_json.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-31 14:32:53 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-31 15:04:08 +0900
commitf4257b605ed61279f9c0b403ac10e9f338fe2dde (patch)
tree7790f33559d9ad72f04c06f660f32ff712a51dc7 /src/static_libs/vg_common/vg_common_json.c
parent174c593c70ae1ac8babc67637aa434aff0dfa243 (diff)
vector lottie: update shape layer order properly.
Shape layer order can be changed during animation, We should rearrange them if it's necessary.
Diffstat (limited to '')
-rw-r--r--src/static_libs/vg_common/vg_common_json.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c
index ba113c2bf8..f0e90b5542 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -22,8 +22,13 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
22{ 22{
23 if (!parent) return; 23 if (!parent) return;
24 24
25 //This list is used for layer order verification
26 Eina_List *list = (Eina_List*) efl_canvas_vg_container_children_direct_get(parent);
27
25 for (unsigned int i = 0; i < layer->mNodeList.size; i++) 28 for (unsigned int i = 0; i < layer->mNodeList.size; i++)
26 { 29 {
30 if (i > 0) list = eina_list_next(list);
31
27 LOTNode *node = layer->mNodeList.ptr[i]; 32 LOTNode *node = layer->mNodeList.ptr[i];
28 if (!node) continue; 33 if (!node) continue;
29 34
@@ -63,7 +68,13 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
63 efl_key_data_set(parent, key, shape); 68 efl_key_data_set(parent, key, shape);
64 } 69 }
65 else 70 else
66 efl_gfx_path_reset(shape); 71 {
72 efl_gfx_path_reset(shape);
73
74 //Layer order is mismatched!
75 if (eina_list_data_get(list) != shape)
76 efl_gfx_stack_raise_to_top(shape);
77 }
67 78
68 //Skip Invisible Stroke? 79 //Skip Invisible Stroke?
69 if (node->mStroke.enable && node->mStroke.width == 0) 80 if (node->mStroke.enable && node->mStroke.width == 0)