thiep pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6a8cf155a30426f140ee4a4988828a7fbf29e69f
commit 6a8cf155a30426f140ee4a4988828a7fbf29e69f Author: Thiep Ha <thie...@gmail.com> Date: Tue Sep 5 14:19:59 2017 +0900 textpath: correct map point number The last map point is not counted if seg is too small. Test: change start angle to 3, the last segment is missed. --- src/bin/elementary/test_ui_textpath.c | 2 +- src/lib/elementary/efl_ui_textpath.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c index 5860ff5a5c..88e8de4ee7 100644 --- a/src/bin/elementary/test_ui_textpath.c +++ b/src/bin/elementary/test_ui_textpath.c @@ -102,7 +102,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve efl_text_set(txtpath, "This text follows the path which you defined. This is a <long> text designed to make it ellipsis."); efl_ui_textpath_circle_set(txtpath, CX, CY, CR, 0, EFL_UI_TEXTPATH_DIRECTION_CCW); - efl_gfx_visible_set(txtpath, EINA_TRUE); + efl_gfx_visible_set(txtpath, EINA_TRUE); path_type = 0; hbox = elm_box_add(win); diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 0ed45e8500..c5ff22a5e0 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -213,6 +213,7 @@ _map_point_calc(Efl_Ui_Textpath_Data *pd) else if (seg->type == EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO) { int no = pd->slice_no * seg->length / (double)pd->total_length; + if (no == 0) no = 1; map_no += no; } } --