summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_shape.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:30:42 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:30:42 +0200
commit0f6328b04feca2e583a3d74b30d636af4f6b6965 (patch)
tree7827a750d77bd2421cf49cde89cd3c244120fbbc /src/lib/evas/canvas/evas_vg_shape.c
parent9fd2b74b081fc86364a8fe635fe3c89035e1e7e2 (diff)
efl: introduce EFL_GFX_CHANGED event and properly propagate up to Evas.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_shape.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index a560029..2a577b8 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -45,6 +45,8 @@ _evas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
45 45
46 pd->fill = eo_ref(f); 46 pd->fill = eo_ref(f);
47 eo_unref(tmp); 47 eo_unref(tmp);
48
49 _evas_vg_node_changed(obj);
48} 50}
49 51
50static Evas_VG_Node * 52static Evas_VG_Node *
@@ -59,6 +61,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_scale_set(Eo *obj EINA_UNUSED,
59 double s) 61 double s)
60{ 62{
61 pd->stroke.scale = s; 63 pd->stroke.scale = s;
64
65 _evas_vg_node_changed(obj);
62} 66}
63 67
64static double 68static double
@@ -77,6 +81,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_color_set(Eo *obj EINA_UNUSED,
77 pd->stroke.g = g; 81 pd->stroke.g = g;
78 pd->stroke.b = b; 82 pd->stroke.b = b;
79 pd->stroke.a = a; 83 pd->stroke.a = a;
84
85 _evas_vg_node_changed(obj);
80} 86}
81 87
82static Eina_Bool 88static Eina_Bool
@@ -137,6 +143,8 @@ _evas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED,
137 143
138 pd->stroke.fill = eo_ref(f); 144 pd->stroke.fill = eo_ref(f);
139 eo_unref(tmp); 145 eo_unref(tmp);
146
147 _evas_vg_node_changed(obj);
140} 148}
141 149
142static Evas_VG_Node * 150static Evas_VG_Node *
@@ -152,6 +160,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_width_set(Eo *obj EINA_UNUSED,
152 double w) 160 double w)
153{ 161{
154 pd->stroke.width = w; 162 pd->stroke.width = w;
163
164 _evas_vg_node_changed(obj);
155} 165}
156 166
157static double 167static double
@@ -167,6 +177,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_location_set(Eo *obj EINA_UNUSED,
167 double centered) 177 double centered)
168{ 178{
169 pd->stroke.centered = centered; 179 pd->stroke.centered = centered;
180
181 _evas_vg_node_changed(obj);
170} 182}
171 183
172static double 184static double
@@ -191,6 +203,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_dash_set(Eo *obj EINA_UNUSED,
191 203
192 memcpy(pd->stroke.dash, dash, sizeof (Efl_Gfx_Dash) * length); 204 memcpy(pd->stroke.dash, dash, sizeof (Efl_Gfx_Dash) * length);
193 pd->stroke.dash_count = length; 205 pd->stroke.dash_count = length;
206
207 _evas_vg_node_changed(obj);
194} 208}
195 209
196static void 210static void
@@ -212,6 +226,8 @@ _evas_vg_shape_stroke_marker_set(Eo *obj EINA_UNUSED,
212 226
213 pd->stroke.marker = eo_ref(m); 227 pd->stroke.marker = eo_ref(m);
214 eo_unref(tmp); 228 eo_unref(tmp);
229
230 _evas_vg_node_changed(obj);
215} 231}
216 232
217static Evas_VG_Shape * 233static Evas_VG_Shape *
@@ -227,6 +243,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_cap_set(Eo *obj EINA_UNUSED,
227 Efl_Gfx_Cap c) 243 Efl_Gfx_Cap c)
228{ 244{
229 pd->stroke.cap = c; 245 pd->stroke.cap = c;
246
247 _evas_vg_node_changed(obj);
230} 248}
231 249
232static Efl_Gfx_Cap 250static Efl_Gfx_Cap
@@ -242,6 +260,8 @@ _evas_vg_shape_efl_gfx_shape_stroke_join_set(Eo *obj EINA_UNUSED,
242 Efl_Gfx_Join j) 260 Efl_Gfx_Join j)
243{ 261{
244 pd->stroke.join = j; 262 pd->stroke.join = j;
263
264 _evas_vg_node_changed(obj);
245} 265}
246 266
247static Efl_Gfx_Join 267static Efl_Gfx_Join
@@ -260,6 +280,10 @@ _evas_vg_shape_render_pre(Eo *obj EINA_UNUSED,
260{ 280{
261 Evas_VG_Shape_Data *pd = data; 281 Evas_VG_Shape_Data *pd = data;
262 Evas_VG_Node_Data *fill, *stroke_fill, *stroke_marker, *mask; 282 Evas_VG_Node_Data *fill, *stroke_fill, *stroke_marker, *mask;
283
284 if (!nd->changed) return ;
285 nd->changed = EINA_FALSE;
286
263 EVAS_VG_COMPUTE_MATRIX(current, parent, nd); 287 EVAS_VG_COMPUTE_MATRIX(current, parent, nd);
264 288
265 fill = _evas_vg_render_pre(pd->fill, s, current); 289 fill = _evas_vg_render_pre(pd->fill, s, current);