diff options
author | Hermet Park <hermetpark@gmail.com> | 2019-12-31 14:32:53 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2019-12-31 15:04:08 +0900 |
commit | f4257b605ed61279f9c0b403ac10e9f338fe2dde (patch) | |
tree | 7790f33559d9ad72f04c06f660f32ff712a51dc7 /src/static_libs | |
parent | 174c593c70ae1ac8babc67637aa434aff0dfa243 (diff) | |
download | efl-f4257b605ed61279f9c0b403ac10e9f338fe2dde.tar.gz |
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 'src/static_libs')
-rw-r--r-- | src/static_libs/vg_common/vg_common_json.c | 13 |
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 { if (!parent) return; + //This list is used for layer order verification + Eina_List *list = (Eina_List*) efl_canvas_vg_container_children_direct_get(parent); + for (unsigned int i = 0; i < layer->mNodeList.size; i++) { + if (i > 0) list = eina_list_next(list); + LOTNode *node = layer->mNodeList.ptr[i]; if (!node) continue; @@ -63,7 +68,13 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l efl_key_data_set(parent, key, shape); } else - efl_gfx_path_reset(shape); + { + efl_gfx_path_reset(shape); + + //Layer order is mismatched! + if (eina_list_data_get(list) != shape) + efl_gfx_stack_raise_to_top(shape); + } //Skip Invisible Stroke? if (node->mStroke.enable && node->mStroke.width == 0) |