summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_ui_textpath.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-07-22 16:47:43 +0900
committerHermet Park <hermetpark@gmail.com>2019-07-22 16:47:43 +0900
commitbf7e05586f002aa66688c37eabcd3a44f847ee16 (patch)
tree730035aa8717b426d6245e5b45ddf371d4abb1de /src/bin/elementary/test_ui_textpath.c
parente97d3c08ea83b611c8b4fd06e1fe5fdd24a1dca9 (diff)
downloadefl-bf7e05586f002aa66688c37eabcd3a44f847ee16.tar.gz
efl_ui_textpath: introduce efl_ui_textpath_circular_set() interface.
Summary: This patch revises efl_ui_textpath_circle_set() interface. Current circle_set() behavior is wrongly working, it makes object minimal size with (x * 2, y * 2). Insanely, how big size if the object is far from the screen origin. Secondly, current interface requires center position, How this center position could be guranteed if user wants to put it into a container? Third, actual textpath output could be out of the textpath boundary, since the textpath is originated to middle of text height. the display boundary can be outside of the textpath geometry by (half of text height). All in all, put altogether in fix, I confirmed there is no methods without any compatibility break. This brings elm_textpath_circular_set() api introduced. @feature Reviewers: #committers, kimcinoo, jsuya Subscribers: zmike, bu5hm4n, segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9260
Diffstat (limited to 'src/bin/elementary/test_ui_textpath.c')
-rw-r--r--src/bin/elementary/test_ui_textpath.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c
index e4756996f3..111ebe1af4 100644
--- a/src/bin/elementary/test_ui_textpath.c
+++ b/src/bin/elementary/test_ui_textpath.c
@@ -6,8 +6,6 @@
#include <Efl_Ui.h>
#include <Elementary.h>
-#define CX 180
-#define CY 150
#define CR 100
#define TEST_UI_TEXTPATH_LONG_TEXT "This text follows the path which you defined. This is a &lt;long&gt; text designed to make it ellipsis."
@@ -31,7 +29,7 @@ _direction_changed_cb(void *data, const Efl_Event *event)
Eina_Bool val = elm_check_selected_get(event->object);
Efl_Ui_Textpath_Direction dir = val ? EFL_UI_TEXTPATH_DIRECTION_CW :
EFL_UI_TEXTPATH_DIRECTION_CCW;
- efl_ui_textpath_circle_set(txtpath, CX, CY, CR, angle, dir);
+ efl_ui_textpath_circular_set(txtpath, CR, angle, dir);
}
static void
@@ -43,7 +41,7 @@ _angle_changed_cb(void *data, const Efl_Event *event)
Eina_Bool val = elm_check_selected_get(dir_chk);
Efl_Ui_Textpath_Direction dir = val ? EFL_UI_TEXTPATH_DIRECTION_CW :
EFL_UI_TEXTPATH_DIRECTION_CCW;
- efl_ui_textpath_circle_set(txtpath, CX, CY, CR, angle, dir);
+ efl_ui_textpath_circular_set(txtpath, CR, angle, dir);
}
static void
@@ -76,7 +74,7 @@ _change_shape_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA
Eina_Bool val = elm_check_selected_get(dir_chk);
Efl_Ui_Textpath_Direction dir = val ? EFL_UI_TEXTPATH_DIRECTION_CW :
EFL_UI_TEXTPATH_DIRECTION_CCW;
- efl_ui_textpath_circle_set(txtpath, CX, CY, CR, angle, dir);
+ efl_ui_textpath_circular_set(txtpath, CR, angle, dir);
}
}
@@ -109,7 +107,7 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
efl_text_set(txtpath, TEST_UI_TEXTPATH_LONG_TEXT);
- efl_ui_textpath_circle_set(txtpath, CX, CY, CR, 0, EFL_UI_TEXTPATH_DIRECTION_CCW);
+ efl_ui_textpath_circular_set(txtpath, CR, 0, EFL_UI_TEXTPATH_DIRECTION_CCW);
efl_gfx_entity_visible_set(txtpath, EINA_TRUE);
path_type = 0;