forked from enlightenment/efl
efl_ui_textpath: code refactoring.
less symbol calls, no logic changes.
This commit is contained in:
parent
6f8d883991
commit
52a7ae56cd
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue