summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-07-22 17:31:06 +0900
committerHermet Park <hermetpark@gmail.com>2019-07-22 17:31:06 +0900
commit44363bb70f3cf92f87755a9f34674a318e50779f (patch)
treedbce1f3a094204b057409081b46b46c23e6fd263
parent2e37d2f30f0e9cee3b71a014908f445c723317aa (diff)
efl_canvas_vg image: changed image parameter type.
it's still in improvement stage in beta.
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_image.c10
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_image.eo3
-rw-r--r--src/static_libs/vg_common/vg_common_json.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.c b/src/lib/evas/canvas/efl_canvas_vg_image.c
index 1a72c69624..d008fd74f9 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_image.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_image.c
@@ -95,20 +95,20 @@ _efl_canvas_vg_image_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Image_Data *pd
95} 95}
96 96
97static void 97static void
98_efl_canvas_vg_image_data_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Image_Data *pd, void *data, int w, int h) 98_efl_canvas_vg_image_data_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Image_Data *pd, void *data, Eina_Size2D size)
99{ 99{
100 if (!data || w <= 0 || h <= 0) 100 if (!data || size.w <= 0 || size.h <= 0)
101 return; 101 return;
102 102
103 if ((pd->image != data || pd->w != w || pd->h != h) && pd->buffer) 103 if ((pd->image != data || pd->w != size.w || pd->h != size.h) && pd->buffer)
104 { 104 {
105 efl_unref(pd->buffer); 105 efl_unref(pd->buffer);
106 pd->buffer= NULL; 106 pd->buffer= NULL;
107 } 107 }
108 108
109 pd->image = data; 109 pd->image = data;
110 pd->w = w; 110 pd->w = size.w;
111 pd->h = h; 111 pd->h = size.h;
112} 112}
113 113
114#include "efl_canvas_vg_image.eo.c" 114#include "efl_canvas_vg_image.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.eo b/src/lib/evas/canvas/efl_canvas_vg_image.eo
index 2c593d425e..05ea4b929f 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_image.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_image.eo
@@ -8,8 +8,7 @@ class @beta Efl.Canvas.Vg.Image extends Efl.Canvas.Vg.Node implements Efl.Gfx.Im
8 } 8 }
9 values { 9 values {
10 pixels: void_ptr; [[Image pixels data. The pixel data type is 32bit RGBA]] 10 pixels: void_ptr; [[Image pixels data. The pixel data type is 32bit RGBA]]
11 w : int; 11 size: Eina.Size2D; [[The size in pixels.]]
12 h : int;
13 } 12 }
14 } 13 }
15 } 14 }
diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c
index 6ecac9901f..9b2d8403f4 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -62,7 +62,7 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
62 node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33); 62 node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33);
63 efl_canvas_vg_node_transformation_set(image, &m); 63 efl_canvas_vg_node_transformation_set(image, &m);
64 64
65 efl_canvas_vg_image_data_set(image, node->mImageInfo.data, node->mImageInfo.width, node->mImageInfo.height); 65 efl_canvas_vg_image_data_set(image, node->mImageInfo.data, EINA_SIZE2D(node->mImageInfo.width, node->mImageInfo.height));
66 66
67 continue; 67 continue;
68 } 68 }