summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_gfx_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/efl/interfaces/efl_gfx_shape.c')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c80
1 files changed, 32 insertions, 48 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index 9fe4d9e..6a23dd4 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -185,9 +185,8 @@ _efl_gfx_shape_path_set(Eo *obj, Efl_Gfx_Shape_Data *pd,
185 &pd->current_ctrl.x, &pd->current_ctrl.y); 185 &pd->current_ctrl.x, &pd->current_ctrl.y);
186 186
187 end: 187 end:
188 eo_do(obj, 188 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
189 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 189 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
190 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
191} 190}
192 191
193static void 192static void
@@ -301,15 +300,14 @@ struct _Efl_Gfx_Property
301static inline void 300static inline void
302_efl_gfx_property_get(const Eo *obj, Efl_Gfx_Property *property) 301_efl_gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
303{ 302{
304 eo_do(obj, 303 property->scale = efl_gfx_shape_stroke_scale_get(obj);
305 property->scale = efl_gfx_shape_stroke_scale_get(), 304 efl_gfx_shape_stroke_color_get(obj, &property->r, &property->g, &property->b, &property->a);
306 efl_gfx_shape_stroke_color_get(&property->r, &property->g, &property->b, &property->a), 305 efl_gfx_color_get(obj, &property->fr, &property->fg, &property->fb, &property->fa);
307 efl_gfx_color_get(&property->fr, &property->fg, &property->fb, &property->fa), 306 property->w = efl_gfx_shape_stroke_width_get(obj);
308 property->w = efl_gfx_shape_stroke_width_get(), 307 property->centered = efl_gfx_shape_stroke_location_get(obj);
309 property->centered = efl_gfx_shape_stroke_location_get(), 308 efl_gfx_shape_stroke_dash_get(obj, &property->dash, &property->dash_length);
310 efl_gfx_shape_stroke_dash_get(&property->dash, &property->dash_length), 309 property->c = efl_gfx_shape_stroke_cap_get(obj);
311 property->c = efl_gfx_shape_stroke_cap_get(), 310 property->j = efl_gfx_shape_stroke_join_get(obj);
312 property->j = efl_gfx_shape_stroke_join_get());
313} 311}
314 312
315static Eina_Bool 313static Eina_Bool
@@ -398,24 +396,16 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd,
398 } 396 }
399 397
400 398
401 eo_do(obj, 399 efl_gfx_shape_stroke_scale_set(obj, interpolate(property_to.scale, property_from.scale, pos_map));
402 efl_gfx_shape_stroke_scale_set(interpolate(property_to.scale, property_from.scale, pos_map)), 400 efl_gfx_shape_stroke_color_set(obj, interpolatei(property_to.r, property_from.r, pos_map), interpolatei(property_to.g, property_from.g, pos_map), interpolatei(property_to.b, property_from.b, pos_map), interpolatei(property_to.a, property_from.a, pos_map));
403 efl_gfx_shape_stroke_color_set(interpolatei(property_to.r, property_from.r, pos_map), 401 efl_gfx_color_set(obj, interpolatei(property_to.fr, property_from.fr, pos_map), interpolatei(property_to.fg, property_from.fg, pos_map), interpolatei(property_to.fb, property_from.fb, pos_map), interpolatei(property_to.fa, property_from.fa, pos_map));
404 interpolatei(property_to.g, property_from.g, pos_map), 402 efl_gfx_shape_stroke_width_set(obj, interpolate(property_to.w, property_from.w, pos_map));
405 interpolatei(property_to.b, property_from.b, pos_map), 403 efl_gfx_shape_stroke_location_set(obj, interpolate(property_to.centered, property_from.centered, pos_map));
406 interpolatei(property_to.a, property_from.a, pos_map)), 404 efl_gfx_shape_stroke_dash_set(obj, dash, property_to.dash_length);
407 efl_gfx_color_set(interpolatei(property_to.fr, property_from.fr, pos_map), 405 efl_gfx_shape_stroke_cap_set(obj, pos_map < 0.5 ? property_from.c : property_to.c);
408 interpolatei(property_to.fg, property_from.fg, pos_map), 406 efl_gfx_shape_stroke_join_set(obj, pos_map < 0.5 ? property_from.j : property_to.j);
409 interpolatei(property_to.fb, property_from.fb, pos_map), 407 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
410 interpolatei(property_to.fa, property_from.fa, pos_map)), 408 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
411 efl_gfx_shape_stroke_width_set(interpolate(property_to.w, property_from.w, pos_map)),
412 efl_gfx_shape_stroke_location_set(interpolate(property_to.centered, property_from.centered, pos_map)),
413 efl_gfx_shape_stroke_dash_set(dash, property_to.dash_length),
414 efl_gfx_shape_stroke_cap_set(pos_map < 0.5 ? property_from.c : property_to.c),
415 efl_gfx_shape_stroke_join_set(pos_map < 0.5 ? property_from.j : property_to.j),
416
417 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
418 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
419 409
420 return EINA_TRUE; 410 return EINA_TRUE;
421} 411}
@@ -449,9 +439,8 @@ _efl_gfx_shape_reset(Eo *obj, Efl_Gfx_Shape_Data *pd)
449 pd->current_ctrl.x = 0; 439 pd->current_ctrl.x = 0;
450 pd->current_ctrl.y = 0; 440 pd->current_ctrl.y = 0;
451 pd->convex = EINA_FALSE; 441 pd->convex = EINA_FALSE;
452 eo_do(obj, 442 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
453 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 443 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
454 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
455} 444}
456 445
457static void 446static void
@@ -470,9 +459,8 @@ _efl_gfx_shape_append_move_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
470 pd->current.x = x; 459 pd->current.x = x;
471 pd->current.y = y; 460 pd->current.y = y;
472 461
473 eo_do(obj, 462 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
474 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 463 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
475 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
476} 464}
477 465
478static void 466static void
@@ -491,9 +479,8 @@ _efl_gfx_shape_append_line_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
491 pd->current.x = x; 479 pd->current.x = x;
492 pd->current.y = y; 480 pd->current.y = y;
493 481
494 eo_do(obj, 482 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
495 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 483 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
496 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
497} 484}
498 485
499static void 486static void
@@ -520,9 +507,8 @@ _efl_gfx_shape_append_cubic_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
520 pd->current_ctrl.x = ctrl_x1; 507 pd->current_ctrl.x = ctrl_x1;
521 pd->current_ctrl.y = ctrl_y1; 508 pd->current_ctrl.y = ctrl_y1;
522 509
523 eo_do(obj, 510 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
524 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 511 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
525 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
526} 512}
527 513
528static void 514static void
@@ -1090,9 +1076,8 @@ _efl_gfx_shape_append_close(Eo *obj, Efl_Gfx_Shape_Data *pd)
1090 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, 1076 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE,
1091 pd, &offset_point); 1077 pd, &offset_point);
1092 1078
1093 eo_do(obj, 1079 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
1094 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 1080 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
1095 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
1096} 1081}
1097 1082
1098static void 1083static void
@@ -1815,9 +1800,8 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const Eo *dup_from)
1815 _efl_gfx_shape_stroke_dash_set(obj, pd, from->public.stroke.dash, from->public.stroke.dash_length); 1800 _efl_gfx_shape_stroke_dash_set(obj, pd, from->public.stroke.dash, from->public.stroke.dash_length);
1816 _efl_gfx_shape_path_set(obj, pd, from->commands, from->points); 1801 _efl_gfx_shape_path_set(obj, pd, from->commands, from->points);
1817 1802
1818 eo_do(obj, 1803 eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
1819 eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL), 1804 eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
1820 eo_event_callback_call(EFL_GFX_CHANGED, NULL));
1821} 1805}
1822 1806
1823#include "interfaces/efl_gfx_shape.eo.c" 1807#include "interfaces/efl_gfx_shape.eo.c"