From 52a7ae56cd4a0593f91c509eaea141329f7b14fd Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Wed, 10 Jul 2019 12:40:53 +0900 Subject: [PATCH] efl_ui_textpath: code refactoring. less symbol calls, no logic changes. --- src/lib/elementary/efl_ui_textpath.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 96c02374fd..4d63a0389a 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -791,6 +791,8 @@ _efl_ui_textpath_efl_gfx_entity_size_set(Eo *obj, Efl_Ui_Textpath_Data *pd EINA_ EOLIAN static void _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction) { + double sweep_length; + if (pd->circle.x == x && pd->circle.y == y && pd->circle.radius == radius && pd->circle.start_angle == start_angle && @@ -804,17 +806,15 @@ _efl_ui_textpath_circle_set(Eo *obj, Efl_Ui_Textpath_Data *pd, double x, double pd->direction = direction; efl_gfx_path_reset(obj); + if (direction == EFL_UI_TEXTPATH_DIRECTION_CW || direction == EFL_UI_TEXTPATH_DIRECTION_CW_CENTER) - { - efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2, - radius * 2, start_angle, -360); - } + sweep_length = -360; else - { - efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2, - radius * 2, start_angle, 360); - } + sweep_length = 360; + + efl_gfx_path_append_arc(obj, x - radius, y - radius, radius * 2, + radius * 2, start_angle, sweep_length); _path_data_get(obj, pd); _path_start_angle_adjust(obj, pd);