summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-07-22 13:53:21 +0900
committerHermet Park <hermetpark@gmail.com>2019-07-22 13:53:21 +0900
commite9f8ef6ea44bdd5750613d88b848d3d1d788de69 (patch)
treeb419035835a4182a0a6f772f95313d3e9ad8a2fc /src/static_libs
parent56ebaea1fe33258e3b489d3a8782dfaa1b904835 (diff)
vg_common_json : Support image data of node
Summary: When node has image data, it creates Efl.Canvas.Vg.Image class and set transform information and data information. Depends on D9218 Ector.Renderer : Implement Ector.Renderer.(Software).Image class D9219 Efl.Canvas.Vg : Implement Efl.Canvas.Vg.Image class Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9220
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/vg_common_json.c27
1 files changed, 26 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 94df54e..6ecac99 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -42,6 +42,31 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
42 LOTNode *node = layer->mNodeList.ptr[i]; 42 LOTNode *node = layer->mNodeList.ptr[i];
43 if (!node) continue; 43 if (!node) continue;
44 44
45 //Image object
46 if (node->mImageInfo.data)
47 {
48 char *key = _get_key_val(node);
49 Efl_Canvas_Vg_Image *image = efl_key_data_get(parent, key);
50 if (!image)
51 {
52 image = efl_add(EFL_CANVAS_VG_IMAGE_CLASS, parent);
53 efl_key_data_set(parent, key, image);
54 }
55 efl_gfx_entity_visible_set(image, EINA_TRUE);
56
57 Eina_Matrix3 m;
58 eina_matrix3_identity(&m);
59 eina_matrix3_values_set( &m,
60 node->mImageInfo.mMatrix.m11, node->mImageInfo.mMatrix.m12, node->mImageInfo.mMatrix.m13,
61 node->mImageInfo.mMatrix.m21, node->mImageInfo.mMatrix.m22, node->mImageInfo.mMatrix.m23,
62 node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33);
63 efl_canvas_vg_node_transformation_set(image, &m);
64
65 efl_canvas_vg_image_data_set(image, node->mImageInfo.data, node->mImageInfo.width, node->mImageInfo.height);
66
67 continue;
68 }
69
45 //Skip Invisible Stroke? 70 //Skip Invisible Stroke?
46 if (node->mStroke.enable && node->mStroke.width == 0) 71 if (node->mStroke.enable && node->mStroke.width == 0)
47 { 72 {
@@ -64,7 +89,7 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
64 else 89 else
65 efl_gfx_path_reset(shape); 90 efl_gfx_path_reset(shape);
66 91
67 efl_gfx_entity_visible_set(shape, EINA_TRUE); 92 efl_gfx_entity_visible_set(shape, EINA_TRUE);
68#if DEBUG 93#if DEBUG
69 for (int i = 0; i < depth; i++) printf(" "); 94 for (int i = 0; i < depth; i++) printf(" ");
70 printf("%s (%p)\n", efl_class_name_get(efl_class_get(shape)), shape); 95 printf("%s (%p)\n", efl_class_name_get(efl_class_get(shape)), shape);