summaryrefslogtreecommitdiff
path: root/src/lib/ector/cairo/ector_renderer_cairo_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/cairo/ector_renderer_cairo_shape.c')
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index 87fe2a0..2605623 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -75,15 +75,19 @@ struct _Ector_Renderer_Cairo_Shape_Data
75 cairo_path_t *path; 75 cairo_path_t *path;
76}; 76};
77 77
78EOLIAN static void 78static void
79_ector_renderer_cairo_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED, 79_ector_renderer_cairo_shape_path_changed(void *data, const Efl_Event *event)
80 Ector_Renderer_Cairo_Shape_Data *pd)
81{ 80{
82 if (pd->path) 81 Ector_Renderer_Cairo_Shape_Data *pd = data;
83 { 82 Efl_Gfx_Path_Change_Event *ev = event->info;
84 cairo_path_destroy(pd->path); 83
85 pd->path = NULL; 84 if (!pd->path) return;
86 } 85 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
86 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
87 return;
88
89 cairo_path_destroy(pd->path);
90 pd->path = NULL;
87} 91}
88 92
89static Eina_Bool 93static Eina_Bool
@@ -251,7 +255,9 @@ _ector_renderer_cairo_shape_efl_object_constructor(Eo *obj, Ector_Renderer_Cairo
251 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 255 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
252 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 256 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
253 257
254 return obj; 258 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_cairo_shape_path_changed, pd);
259
260 return obj;
255} 261}
256 262
257static Efl_Object * 263static Efl_Object *