summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c24
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.eo1
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c21
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.eo1
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c43
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.c49
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.eo13
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c3
-rw-r--r--src/lib/elementary/efl_ui_textpath.c16
-rw-r--r--src/lib/elementary/efl_ui_textpath.eo1
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c51
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.eo1
13 files changed, 132 insertions, 94 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 *
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
index 7c95844..b76dd29 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.eo
@@ -6,7 +6,6 @@ class Ector.Renderer.Cairo.Shape (Ector.Renderer.Cairo, Ector.Renderer.Shape, Ef
6 Ector.Renderer.prepare; 6 Ector.Renderer.prepare;
7 Ector.Renderer.draw; 7 Ector.Renderer.draw;
8 Efl.Gfx.Path.bounds_get; 8 Efl.Gfx.Path.bounds_get;
9 Efl.Gfx.Path.commit;
10 Ector.Renderer.crc { get; } 9 Ector.Renderer.crc { get; }
11 Ector.Renderer.Cairo.op_fill; 10 Ector.Renderer.Cairo.op_fill;
12 Efl.Object.constructor; 11 Efl.Object.constructor;
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index cf2266d..79e029d 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -20,15 +20,18 @@ struct _Ector_Renderer_GL_Shape_Data
20 GLshort *vertex; 20 GLshort *vertex;
21}; 21};
22 22
23EOLIAN static void 23static void
24_ector_renderer_gl_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED, 24_ector_renderer_gl_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
25 Ector_Renderer_GL_Shape_Data *pd)
26{ 25{
27 if (pd->vertex) 26 Ector_Renderer_GL_Shape_Data *pd = data;
28 { 27 Efl_Gfx_Path_Change_Event *ev = event->info;
29 free(pd->vertex); 28
30 pd->vertex = NULL; 29 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
31 } 30 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
31 return;
32
33 free(pd->vertex);
34 pd->vertex = NULL;
32} 35}
33 36
34static Eina_Bool 37static Eina_Bool
@@ -151,6 +154,8 @@ _ector_renderer_gl_shape_efl_object_constructor(Eo *obj, Ector_Renderer_GL_Shape
151 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 154 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
152 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 155 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
153 156
157 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
158
154 return obj; 159 return obj;
155} 160}
156 161
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.eo b/src/lib/ector/gl/ector_renderer_gl_shape.eo
index 6323ef6..21ef655 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.eo
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.eo
@@ -8,7 +8,6 @@ class Ector.Renderer.GL.Shape (Ector.Renderer.GL, Ector.Renderer.Shape, Efl.Gfx.
8 Ector.Renderer.crc { get; } 8 Ector.Renderer.crc { get; }
9 Ector.Renderer.GL.op_fill; 9 Ector.Renderer.GL.op_fill;
10 Efl.Gfx.Path.bounds_get; 10 Efl.Gfx.Path.bounds_get;
11 Efl.Gfx.Path.commit;
12 Efl.Object.constructor; 11 Efl.Object.constructor;
13 Efl.Object.destructor; 12 Efl.Object.destructor;
14 } 13 }
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index b9cf1fa..396e472 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -734,20 +734,36 @@ _ector_renderer_software_shape_ector_renderer_software_op_fill(Eo *obj EINA_UNUS
734 return EINA_FALSE; 734 return EINA_FALSE;
735} 735}
736 736
737EOLIAN static void 737static void
738_ector_renderer_software_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED, 738_ector_renderer_software_shape_efl_gfx_path_path_set(Eo *obj,
739 Ector_Renderer_Software_Shape_Data *pd) 739 Ector_Renderer_Software_Shape_Data *pd,
740 const Efl_Gfx_Path_Command *op,
741 const double *points)
740{ 742{
741 if (pd->shape_data) 743 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
742 { 744 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
743 ector_software_rasterizer_destroy_rle_data(pd->shape_data); 745 pd->shape_data = NULL;
744 pd->shape_data = NULL; 746 pd->outline_data = NULL;
745 } 747
746 if (pd->outline_data) 748 efl_gfx_path_set(efl_super(obj, MY_CLASS), op, points);
747 { 749}
748 ector_software_rasterizer_destroy_rle_data(pd->outline_data); 750
749 pd->outline_data = NULL; 751
750 } 752static void
753_ector_renderer_software_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
754{
755 Ector_Renderer_Software_Shape_Data *pd = data;
756 Efl_Gfx_Path_Change_Event *ev = event->info;
757
758 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
759 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
760 return;
761
762 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
763 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
764
765 pd->shape_data = NULL;
766 pd->outline_data = NULL;
751} 767}
752 768
753static Eo * 769static Eo *
@@ -761,6 +777,7 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
761 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj); 777 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
762 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 778 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
763 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 779 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
780 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_software_shape_path_changed, pd);
764 781
765 return obj; 782 return obj;
766} 783}
diff --git a/src/lib/ector/software/ector_renderer_software_shape.eo b/src/lib/ector/software/ector_renderer_software_shape.eo
index 04f19ba..abe8344 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.eo
+++ b/src/lib/ector/software/ector_renderer_software_shape.eo
@@ -8,7 +8,7 @@ class Ector.Renderer.Software.Shape (Ector.Renderer.Software, Ector.Renderer.Sha
8 Ector.Renderer.Software.op_fill; 8 Ector.Renderer.Software.op_fill;
9 Ector.Renderer.mask { set; } 9 Ector.Renderer.mask { set; }
10 Ector.Renderer.crc { get; } 10 Ector.Renderer.crc { get; }
11 Efl.Gfx.Path.commit; 11 Efl.Gfx.Path.path { set; }
12 Efl.Object.constructor; 12 Efl.Object.constructor;
13 Efl.Object.destructor; 13 Efl.Object.destructor;
14 } 14 }
diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c
index c40d33a..7278216 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -173,6 +173,7 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
173 return; 173 return;
174 } 174 }
175 175
176 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
176 Efl_Gfx_Path_Command *cmds; 177 Efl_Gfx_Path_Command *cmds;
177 double *pts; 178 double *pts;
178 unsigned int cmds_length = 0, pts_length = 0; 179 unsigned int cmds_length = 0, pts_length = 0;
@@ -201,6 +202,8 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
201 _efl_gfx_path_current_search(pd->commands, pd->points, 202 _efl_gfx_path_current_search(pd->commands, pd->points,
202 &pd->current.x, &pd->current.y, 203 &pd->current.x, &pd->current.y,
203 &pd->current_ctrl.x, &pd->current_ctrl.y); 204 &pd->current_ctrl.x, &pd->current_ctrl.y);
205
206 efl_event_callback_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
204} 207}
205 208
206EOLIAN static void 209EOLIAN static void
@@ -290,6 +293,7 @@ EOLIAN static Eina_Bool
290_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd, 293_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
291 const Eo *from, const Eo *to, double pos_map) 294 const Eo *from, const Eo *to, double pos_map)
292{ 295{
296 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
293 Efl_Gfx_Path_Data *from_pd, *to_pd; 297 Efl_Gfx_Path_Data *from_pd, *to_pd;
294 Efl_Gfx_Path_Command *cmds; 298 Efl_Gfx_Path_Command *cmds;
295 double interv; //interpolated value 299 double interv; //interpolated value
@@ -370,6 +374,8 @@ _efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
370 374
371 } 375 }
372 376
377 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
378
373 return EINA_TRUE; 379 return EINA_TRUE;
374} 380}
375 381
@@ -405,8 +411,10 @@ _efl_gfx_path_reserve(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd,
405} 411}
406 412
407EOLIAN static void 413EOLIAN static void
408_efl_gfx_path_reset(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd) 414_efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
409{ 415{
416 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
417
410 free(pd->commands); 418 free(pd->commands);
411 pd->reserved_cmd_cnt = 0; 419 pd->reserved_cmd_cnt = 0;
412 pd->commands = NULL; 420 pd->commands = NULL;
@@ -425,13 +433,15 @@ _efl_gfx_path_reset(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd)
425 pd->current_ctrl.x = 0; 433 pd->current_ctrl.x = 0;
426 pd->current_ctrl.y = 0; 434 pd->current_ctrl.y = 0;
427 pd->convex = EINA_FALSE; 435 pd->convex = EINA_FALSE;
436
437 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
428} 438}
429 439
430EOLIAN static void 440EOLIAN static void
431_efl_gfx_path_append_move_to(Eo *obj EINA_UNUSED, 441_efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
432 Efl_Gfx_Path_Data *pd, 442 double x, double y)
433 double x, double y)
434{ 443{
444 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
435 double *offset_point; 445 double *offset_point;
436 446
437 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, pd, &offset_point)) 447 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, pd, &offset_point))
@@ -442,13 +452,15 @@ _efl_gfx_path_append_move_to(Eo *obj EINA_UNUSED,
442 452
443 pd->current.x = x; 453 pd->current.x = x;
444 pd->current.y = y; 454 pd->current.y = y;
455
456 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
445} 457}
446 458
447EOLIAN static void 459EOLIAN static void
448_efl_gfx_path_append_line_to(Eo *obj EINA_UNUSED, 460_efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
449 Efl_Gfx_Path_Data *pd, 461 double x, double y)
450 double x, double y)
451{ 462{
463 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
452 double *offset_point; 464 double *offset_point;
453 465
454 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, pd, &offset_point)) 466 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, pd, &offset_point))
@@ -459,15 +471,17 @@ _efl_gfx_path_append_line_to(Eo *obj EINA_UNUSED,
459 471
460 pd->current.x = x; 472 pd->current.x = x;
461 pd->current.y = y; 473 pd->current.y = y;
474
475 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
462} 476}
463 477
464EOLIAN static void 478EOLIAN static void
465_efl_gfx_path_append_cubic_to(Eo *obj EINA_UNUSED, 479_efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
466 Efl_Gfx_Path_Data *pd, 480 double ctrl_x0, double ctrl_y0,
467 double ctrl_x0, double ctrl_y0, 481 double ctrl_x1, double ctrl_y1,
468 double ctrl_x1, double ctrl_y1, 482 double x, double y)
469 double x, double y)
470{ 483{
484 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
471 double *offset_point; 485 double *offset_point;
472 486
473 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO, 487 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO,
@@ -485,6 +499,8 @@ _efl_gfx_path_append_cubic_to(Eo *obj EINA_UNUSED,
485 pd->current.y = y; 499 pd->current.y = y;
486 pd->current_ctrl.x = ctrl_x1; 500 pd->current_ctrl.x = ctrl_x1;
487 pd->current_ctrl.y = ctrl_y1; 501 pd->current_ctrl.y = ctrl_y1;
502
503 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
488} 504}
489 505
490EOLIAN static void 506EOLIAN static void
@@ -1068,10 +1084,14 @@ _efl_gfx_path_append_arc(Eo *obj, Efl_Gfx_Path_Data *pd,
1068} 1084}
1069 1085
1070EOLIAN static void 1086EOLIAN static void
1071_efl_gfx_path_append_close(Eo *obj EINA_UNUSED, Efl_Gfx_Path_Data *pd) 1087_efl_gfx_path_append_close(Eo *obj, Efl_Gfx_Path_Data *pd)
1072{ 1088{
1089 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
1073 double *offset_point; 1090 double *offset_point;
1091
1074 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point); 1092 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point);
1093
1094 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
1075} 1095}
1076 1096
1077static void 1097static void
@@ -1518,6 +1538,7 @@ error:
1518EOLIAN static void 1538EOLIAN static void
1519_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from) 1539_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
1520{ 1540{
1541 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
1521 Efl_Gfx_Path_Data *from; 1542 Efl_Gfx_Path_Data *from;
1522 1543
1523 if (obj == dup_from) return; 1544 if (obj == dup_from) return;
@@ -1527,6 +1548,8 @@ _efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
1527 pd->convex = from->convex; 1548 pd->convex = from->convex;
1528 1549
1529 _efl_gfx_path_path_set(obj, pd, from->commands, from->points); 1550 _efl_gfx_path_path_set(obj, pd, from->commands, from->points);
1551
1552 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
1530} 1553}
1531 1554
1532#include "interfaces/efl_gfx_path.eo.c" 1555#include "interfaces/efl_gfx_path.eo.c"
diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo
index d60886e..c1ec7aa 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.eo
+++ b/src/lib/efl/interfaces/efl_gfx_path.eo
@@ -292,15 +292,8 @@ mixin Efl.Gfx.Path
292 @in pts_count: uint; [[Pointers count to reserve]] 292 @in pts_count: uint; [[Pointers count to reserve]]
293 } 293 }
294 } 294 }
295 commit @pure_virtual { 295 }
296 [[Request to update the path object. 296 events {
297 297 changed: Efl.Gfx.Path_Change_Event; [[Graphics path was changed.]]
298 One path object may get appending several path calls (such as
299 append_cubic, append_rect, etc) to construct the final path data.
300 Here commit means all path data is prepared and now object
301 could update its own internal status based on the last path
302 information.
303 ]]
304 }
305 } 298 }
306} 299}
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index bdebbfa..a9327c3 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -161,7 +161,10 @@ _efl_gfx_shape_stroke_color_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Shape_Data *p
161EOLIAN static void 161EOLIAN static void
162_efl_gfx_shape_stroke_width_set(Eo *obj, Efl_Gfx_Shape_Data *pd, double w) 162_efl_gfx_shape_stroke_width_set(Eo *obj, Efl_Gfx_Shape_Data *pd, double w)
163{ 163{
164 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
165
164 pd->public.stroke.width = w; 166 pd->public.stroke.width = w;
167 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
165} 168}
166 169
167EOLIAN static double 170EOLIAN static double
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index 095c7a3..192478e 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -544,10 +544,17 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd)
544} 544}
545 545
546static void 546static void
547_efl_ui_textpath_efl_gfx_path_commit(Eo *obj, Efl_Ui_Textpath_Data *pd) 547_path_changed_cb(void *data, const Efl_Event *event)
548{ 548{
549 _path_data_get(obj, pd, EINA_TRUE); 549 Efl_Gfx_Path_Change_Event *ev = event->info;
550 _sizing_eval(pd); 550 EFL_UI_TEXTPATH_DATA_GET(data, sd);
551
552 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
553 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
554 return;
555
556 _path_data_get(data, sd, EINA_TRUE);
557 _sizing_eval(sd);
551} 558}
552 559
553static Eina_Bool 560static Eina_Bool
@@ -587,6 +594,8 @@ _efl_ui_textpath_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Textpath_Data *priv)
587 594
588 evas_object_smart_member_add(priv->text_obj, obj); 595 evas_object_smart_member_add(priv->text_obj, obj);
589 elm_widget_sub_object_add(obj, priv->text_obj); 596 elm_widget_sub_object_add(obj, priv->text_obj);
597
598 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _path_changed_cb, obj);
590} 599}
591 600
592EOLIAN static Efl_Object * 601EOLIAN static Efl_Object *
@@ -705,7 +714,6 @@ _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double
705 radius * 2, start_angle, 360); 714 radius * 2, start_angle, 360);
706 } 715 }
707 716
708 _path_data_get(obj, pd, EINA_TRUE);
709 _sizing_eval(pd); 717 _sizing_eval(pd);
710} 718}
711 719
diff --git a/src/lib/elementary/efl_ui_textpath.eo b/src/lib/elementary/efl_ui_textpath.eo
index bc25a0b..917621c 100644
--- a/src/lib/elementary/efl_ui_textpath.eo
+++ b/src/lib/elementary/efl_ui_textpath.eo
@@ -40,7 +40,6 @@ class Efl.Ui.Textpath (Efl.Ui.Layout, Efl.Text, Efl.Gfx.Path)
40 implements { 40 implements {
41 Efl.Object.constructor; 41 Efl.Object.constructor;
42 Efl.Object.destructor; 42 Efl.Object.destructor;
43 Efl.Gfx.Path.commit;
44 Efl.Canvas.Group.group_calculate; 43 Efl.Canvas.Group.group_calculate;
45 Efl.Text.text {get; set;} 44 Efl.Text.text {get; set;}
46 Efl.Part.part_get; 45 Efl.Part.part_get;
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index d1c41fa..728afb5 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -17,6 +17,11 @@ struct _Efl_Canvas_Vg_Shape_Data
17}; 17};
18 18
19// FIXME: Use the renderer bounding box when it has been created instead of an estimation 19// FIXME: Use the renderer bounding box when it has been created instead of an estimation
20static void
21_efl_canvas_vg_shape_path_changed(void *data, const Efl_Event *event)
22{
23 efl_canvas_vg_node_change(event->object);
24}
20 25
21static void 26static void
22_efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED, 27_efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
@@ -27,6 +32,8 @@ _efl_canvas_vg_shape_fill_set(Eo *obj EINA_UNUSED,
27 32
28 pd->fill = efl_ref(f); 33 pd->fill = efl_ref(f);
29 efl_unref(tmp); 34 efl_unref(tmp);
35
36 efl_canvas_vg_node_change(obj);
30} 37}
31 38
32static Efl_Canvas_Vg_Node * 39static Efl_Canvas_Vg_Node *
@@ -44,6 +51,8 @@ _efl_canvas_vg_shape_stroke_fill_set(Eo *obj EINA_UNUSED,
44 51
45 pd->stroke.fill = efl_ref(f); 52 pd->stroke.fill = efl_ref(f);
46 efl_unref(tmp); 53 efl_unref(tmp);
54
55 efl_canvas_vg_node_change(obj);
47} 56}
48 57
49static Efl_Canvas_Vg_Node * 58static Efl_Canvas_Vg_Node *
@@ -62,6 +71,8 @@ _efl_canvas_vg_shape_stroke_marker_set(Eo *obj EINA_UNUSED,
62 71
63 pd->stroke.marker = efl_ref(m); 72 pd->stroke.marker = efl_ref(m);
64 efl_unref(tmp); 73 efl_unref(tmp);
74
75 efl_canvas_vg_node_change(obj);
65} 76}
66 77
67static Efl_Canvas_Vg_Shape * 78static Efl_Canvas_Vg_Shape *
@@ -108,9 +119,9 @@ _efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
108 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL); 119 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL);
109 ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL); 120 ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL);
110 efl_gfx_path_copy_from(nd->renderer, obj); 121 efl_gfx_path_copy_from(nd->renderer, obj);
111 efl_gfx_path_commit(nd->renderer);
112 ector_renderer_prepare(nd->renderer); 122 ector_renderer_prepare(nd->renderer);
113 ector_renderer_mask_set(nd->renderer, mask, mask_op); 123 ector_renderer_mask_set(nd->renderer, mask, mask_op);
124
114} 125}
115 126
116static Eo * 127static Eo *
@@ -129,6 +140,9 @@ _efl_canvas_vg_shape_efl_object_constructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *p
129 nd->render_pre = _efl_canvas_vg_shape_render_pre; 140 nd->render_pre = _efl_canvas_vg_shape_render_pre;
130 nd->data = pd; 141 nd->data = pd;
131 142
143 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED,
144 _efl_canvas_vg_shape_path_changed, pd);
145
132 return obj; 146 return obj;
133} 147}
134 148
@@ -139,6 +153,9 @@ _efl_canvas_vg_shape_efl_object_destructor(Eo *obj, Efl_Canvas_Vg_Shape_Data *pd
139 if (pd->stroke.fill) efl_unref(pd->stroke.fill); 153 if (pd->stroke.fill) efl_unref(pd->stroke.fill);
140 if (pd->stroke.marker) efl_unref(pd->stroke.marker); 154 if (pd->stroke.marker) efl_unref(pd->stroke.marker);
141 155
156 efl_event_callback_del(obj, EFL_GFX_PATH_EVENT_CHANGED,
157 _efl_canvas_vg_shape_path_changed, pd);
158
142 efl_gfx_path_reset(obj); 159 efl_gfx_path_reset(obj);
143 efl_destructor(efl_super(obj, MY_CLASS)); 160 efl_destructor(efl_super(obj, MY_CLASS));
144} 161}
@@ -180,12 +197,6 @@ _efl_canvas_vg_shape_efl_gfx_path_interpolate(Eo *obj,
180 return r; 197 return r;
181} 198}
182 199
183EOLIAN static void
184_efl_canvas_vg_shape_efl_gfx_path_commit(Eo *obj,
185 Efl_Canvas_Vg_Shape_Data *pd EINA_UNUSED)
186{
187 efl_canvas_vg_node_change(obj);
188}
189 200
190EOLIAN static Efl_Canvas_Vg_Node * 201EOLIAN static Efl_Canvas_Vg_Node *
191_efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_Data *pd) 202_efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_Data *pd)
@@ -230,7 +241,6 @@ EAPI void
230evas_vg_shape_stroke_scale_set(Eo *obj, double s) 241evas_vg_shape_stroke_scale_set(Eo *obj, double s)
231{ 242{
232 efl_gfx_shape_stroke_scale_set(obj, s); 243 efl_gfx_shape_stroke_scale_set(obj, s);
233 efl_canvas_vg_node_change(obj);
234} 244}
235 245
236EAPI void 246EAPI void
@@ -243,7 +253,6 @@ EAPI void
243evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a) 253evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a)
244{ 254{
245 efl_gfx_shape_stroke_color_set(obj, r, g, b, a); 255 efl_gfx_shape_stroke_color_set(obj, r, g, b, a);
246 efl_canvas_vg_node_change(obj);
247} 256}
248 257
249EAPI double 258EAPI double
@@ -256,7 +265,6 @@ EAPI void
256evas_vg_shape_stroke_width_set(Eo *obj, double w) 265evas_vg_shape_stroke_width_set(Eo *obj, double w)
257{ 266{
258 efl_gfx_shape_stroke_width_set(obj, w); 267 efl_gfx_shape_stroke_width_set(obj, w);
259 efl_canvas_vg_node_change(obj);
260} 268}
261 269
262EAPI double 270EAPI double
@@ -269,7 +277,6 @@ EAPI void
269evas_vg_shape_stroke_location_set(Eo *obj, double centered) 277evas_vg_shape_stroke_location_set(Eo *obj, double centered)
270{ 278{
271 efl_gfx_shape_stroke_location_set(obj, centered); 279 efl_gfx_shape_stroke_location_set(obj, centered);
272 efl_canvas_vg_node_change(obj);
273} 280}
274 281
275EAPI void 282EAPI void
@@ -282,7 +289,6 @@ EAPI void
282evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length) 289evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length)
283{ 290{
284 efl_gfx_shape_stroke_dash_set(obj, dash, length); 291 efl_gfx_shape_stroke_dash_set(obj, dash, length);
285 efl_canvas_vg_node_change(obj);
286} 292}
287 293
288EAPI Efl_Gfx_Cap 294EAPI Efl_Gfx_Cap
@@ -295,7 +301,6 @@ EAPI void
295evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c) 301evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c)
296{ 302{
297 efl_gfx_shape_stroke_cap_set(obj, c); 303 efl_gfx_shape_stroke_cap_set(obj, c);
298 efl_canvas_vg_node_change(obj);
299} 304}
300 305
301EAPI Efl_Gfx_Join 306EAPI Efl_Gfx_Join
@@ -308,14 +313,12 @@ EAPI void
308evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j) 313evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j)
309{ 314{
310 efl_gfx_shape_stroke_join_set(obj, j); 315 efl_gfx_shape_stroke_join_set(obj, j);
311 efl_canvas_vg_node_change(obj);
312} 316}
313 317
314EAPI void 318EAPI void
315evas_vg_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points) 319evas_vg_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points)
316{ 320{
317 efl_gfx_path_set(obj, op, points); 321 efl_gfx_path_set(obj, op, points);
318 efl_canvas_vg_node_change(obj);
319} 322}
320 323
321EAPI void 324EAPI void
@@ -346,106 +349,90 @@ EAPI void
346evas_vg_shape_dup(Eo *obj, Eo *dup_from) 349evas_vg_shape_dup(Eo *obj, Eo *dup_from)
347{ 350{
348 efl_gfx_path_copy_from(obj, dup_from); 351 efl_gfx_path_copy_from(obj, dup_from);
349 efl_canvas_vg_node_change(obj);
350} 352}
351 353
352EAPI void 354EAPI void
353evas_vg_shape_reset(Eo *obj) 355evas_vg_shape_reset(Eo *obj)
354{ 356{
355 efl_gfx_path_reset(obj); 357 efl_gfx_path_reset(obj);
356 efl_canvas_vg_node_change(obj);
357} 358}
358 359
359EAPI void 360EAPI void
360evas_vg_shape_append_move_to(Eo *obj, double x, double y) 361evas_vg_shape_append_move_to(Eo *obj, double x, double y)
361{ 362{
362 efl_gfx_path_append_move_to(obj, x, y); 363 efl_gfx_path_append_move_to(obj, x, y);
363 efl_canvas_vg_node_change(obj);
364} 364}
365 365
366EAPI void 366EAPI void
367evas_vg_shape_append_line_to(Eo *obj, double x, double y) 367evas_vg_shape_append_line_to(Eo *obj, double x, double y)
368{ 368{
369 efl_gfx_path_append_line_to(obj, x, y); 369 efl_gfx_path_append_line_to(obj, x, y);
370 efl_canvas_vg_node_change(obj);
371} 370}
372 371
373EAPI void 372EAPI void
374evas_vg_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y) 373evas_vg_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
375{ 374{
376 efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y); 375 efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
377 efl_canvas_vg_node_change(obj);
378} 376}
379 377
380EAPI void 378EAPI void
381evas_vg_shape_append_squadratic_to(Eo *obj, double x, double y) 379evas_vg_shape_append_squadratic_to(Eo *obj, double x, double y)
382{ 380{
383 efl_gfx_path_append_squadratic_to(obj, x, y); 381 efl_gfx_path_append_squadratic_to(obj, x, y);
384 efl_canvas_vg_node_change(obj);
385} 382}
386 383
387EAPI void 384EAPI void
388evas_vg_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1) 385evas_vg_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
389{ 386{
390 efl_gfx_path_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1); 387 efl_gfx_path_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1);
391 efl_canvas_vg_node_change(obj);
392} 388}
393 389
394EAPI void 390EAPI void
395evas_vg_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y) 391evas_vg_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y)
396{ 392{
397 efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y); 393 efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
398 efl_canvas_vg_node_change(obj);
399} 394}
400 395
401EAPI void 396EAPI void
402evas_vg_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep) 397evas_vg_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
403{ 398{
404 efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep); 399 efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
405 efl_canvas_vg_node_change(obj);
406} 400}
407 401
408EAPI void 402EAPI void
409evas_vg_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length) 403evas_vg_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
410{ 404{
411 efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length); 405 efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length);
412 efl_canvas_vg_node_change(obj);
413} 406}
414 407
415EAPI void 408EAPI void
416evas_vg_shape_append_close(Eo *obj) 409evas_vg_shape_append_close(Eo *obj)
417{ 410{
418 efl_gfx_path_append_close(obj); 411 efl_gfx_path_append_close(obj);
419 efl_canvas_vg_node_change(obj);
420} 412}
421 413
422EAPI void 414EAPI void
423evas_vg_shape_append_circle(Eo *obj, double x, double y, double radius) 415evas_vg_shape_append_circle(Eo *obj, double x, double y, double radius)
424{ 416{
425 efl_gfx_path_append_circle(obj, x, y, radius); 417 efl_gfx_path_append_circle(obj, x, y, radius);
426 efl_canvas_vg_node_change(obj);
427} 418}
428 419
429EAPI void 420EAPI void
430evas_vg_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry) 421evas_vg_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry)
431{ 422{
432 efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry); 423 efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);
433 efl_canvas_vg_node_change(obj);
434} 424}
435 425
436EAPI void 426EAPI void
437evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data) 427evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data)
438{ 428{
439 efl_gfx_path_append_svg_path(obj, svg_path_data); 429 efl_gfx_path_append_svg_path(obj, svg_path_data);
440 efl_canvas_vg_node_change(obj);
441} 430}
442 431
443EAPI Eina_Bool 432EAPI Eina_Bool
444evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map) 433evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map)
445{ 434{
446 Eina_Bool ret = efl_gfx_path_interpolate(obj, from, to, pos_map); 435 return efl_gfx_path_interpolate(obj, from, to, pos_map);
447 efl_canvas_vg_node_change(obj);
448 return ret;
449} 436}
450 437
451EAPI Eina_Bool 438EAPI Eina_Bool
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.eo b/src/lib/evas/canvas/efl_canvas_vg_shape.eo
index 2997071..c51df0b 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.eo
@@ -36,7 +36,6 @@ class Efl.Canvas.Vg.Shape (Efl.Canvas.Vg.Node, Efl.Gfx.Shape)
36 } 36 }
37 implements { 37 implements {
38 Efl.Gfx.Path.interpolate; 38 Efl.Gfx.Path.interpolate;
39 Efl.Gfx.Path.commit;
40 Efl.Duplicate.duplicate; 39 Efl.Duplicate.duplicate;
41 Efl.Object.constructor; 40 Efl.Object.constructor;
42 Efl.Object.destructor; 41 Efl.Object.destructor;