vg_common_json: Set container's alpha color 52/207952/2
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 11 Jun 2019 10:01:11 +0000 (19:01 +0900)
committerHermet Park <chuneon.park@samsung.com>
Wed, 19 Jun 2019 01:25:14 +0000 (01:25 +0000)
Summary: If the layer has an alpha value, we have make it available to container.

Test Plan: N/A

Reviewers: Hermet, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9081

Change-Id: I6e28865b2371fc6a523d28b51a62f805d7571398

src/static_libs/vg_common/vg_common_json.c

index 3d00bbb..f289bd6 100644 (file)
@@ -361,6 +361,11 @@ _update_vg_tree(Efl_Canvas_Vg_Container *root, const LOTLayerNode *layer, int de
         for (int i = 0; i < depth; i++) printf("    ");
         printf("%s (%p) matte:%d => %p\n", efl_class_name_get(efl_class_get(ctree)), ctree, matte_mode, ptree);
 #endif
+
+        //Set Container's alpha color
+        if (clayer->mAlpha < 255)
+           efl_gfx_color_set(ctree, clayer->mAlpha, clayer->mAlpha, clayer->mAlpha, clayer->mAlpha);
+
         _update_vg_tree(ctree, clayer, depth+1);
 
         if (matte_mode != 0)
@@ -438,6 +443,8 @@ vg_common_json_create_vg_node(Vg_File_Data *vfd)
         efl_key_data_set(root, _get_key_val((void *) tree), tree);
         vfd->root = root;
      }
+   if (tree->mAlpha < 255)
+      efl_gfx_color_set(root, tree->mAlpha, tree->mAlpha, tree->mAlpha, tree->mAlpha);
 
    _update_vg_tree(root, tree, 1);
 #else