2019-03-05 14:00:37 -08:00
|
|
|
#ifndef _EFL_UI_TEXTPATH_EO_LEGACY_H_
|
|
|
|
#define _EFL_UI_TEXTPATH_EO_LEGACY_H_
|
|
|
|
|
|
|
|
#ifndef _EFL_UI_TEXTPATH_EO_CLASS_TYPE
|
|
|
|
#define _EFL_UI_TEXTPATH_EO_CLASS_TYPE
|
|
|
|
|
|
|
|
typedef Eo Efl_Ui_Textpath;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _EFL_UI_TEXTPATH_EO_TYPES
|
|
|
|
#define _EFL_UI_TEXTPATH_EO_TYPES
|
|
|
|
|
|
|
|
/** Textpath direction
|
|
|
|
*
|
2019-05-12 21:06:54 -07:00
|
|
|
* @ingroup Elm_Textpath_Group
|
2019-03-05 14:00:37 -08:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
EFL_UI_TEXTPATH_DIRECTION_CW = 0, /**< Clockwise */
|
2019-05-20 22:31:12 -07:00
|
|
|
EFL_UI_TEXTPATH_DIRECTION_CCW, /**< Counter-clockwise */
|
|
|
|
EFL_UI_TEXTPATH_DIRECTION_CW_CENTER, /**< Clockwise, middle of text will be at start angle @since 1.23 */
|
|
|
|
EFL_UI_TEXTPATH_DIRECTION_CCW_CENTER /**< Counter-clockwise, middle of text will be at start angle @since 1.23 */
|
2019-03-05 14:00:37 -08:00
|
|
|
} Efl_Ui_Textpath_Direction;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
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
2019-07-22 00:47:43 -07:00
|
|
|
/**
|
|
|
|
* @brief Set a circle with given radius, and start angle.
|
|
|
|
* The circle center will be decided by the object center position.
|
|
|
|
*
|
|
|
|
* @param[in] obj The object.
|
|
|
|
* @param[in] radius Radius of the circle
|
|
|
|
* @param[in] start_angle Start angle of the circle
|
|
|
|
* @param[in] direction Textpath direction
|
|
|
|
*
|
|
|
|
* @since 1.23
|
|
|
|
* @ingroup Elm_Textpath_Group
|
|
|
|
*/
|
|
|
|
EAPI void elm_textpath_circular_set(Efl_Ui_Textpath *obj, double radius, double start_angle, Efl_Ui_Textpath_Direction direction);
|
|
|
|
|
2019-03-05 14:00:37 -08:00
|
|
|
/**
|
|
|
|
* @brief The number of slices. The larger the number of slice_num is, The
|
|
|
|
* better the text follows the path.
|
|
|
|
*
|
|
|
|
* @param[in] obj The object.
|
|
|
|
* @param[in] slice_no Number of slices
|
|
|
|
*
|
|
|
|
* @ingroup Elm_Textpath_Group
|
|
|
|
*/
|
|
|
|
EAPI void elm_textpath_slice_number_set(Efl_Ui_Textpath *obj, int slice_no);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The number of slices. The larger the number of slice_num is, The
|
|
|
|
* better the text follows the path.
|
|
|
|
*
|
|
|
|
* @param[in] obj The object.
|
|
|
|
*
|
|
|
|
* @return Number of slices
|
|
|
|
*
|
|
|
|
* @ingroup Elm_Textpath_Group
|
|
|
|
*/
|
|
|
|
EAPI int elm_textpath_slice_number_get(const Efl_Ui_Textpath *obj);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Control the ellipsis behavior of the textpath.
|
|
|
|
*
|
|
|
|
* @param[in] obj The object.
|
|
|
|
* @param[in] ellipsis To ellipsis text or not
|
|
|
|
*
|
|
|
|
* @ingroup Elm_Textpath_Group
|
|
|
|
*/
|
|
|
|
EAPI void elm_textpath_ellipsis_set(Efl_Ui_Textpath *obj, Eina_Bool ellipsis);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Control the ellipsis behavior of the textpath.
|
|
|
|
*
|
|
|
|
* @param[in] obj The object.
|
|
|
|
*
|
|
|
|
* @return To ellipsis text or not
|
|
|
|
*
|
|
|
|
* @ingroup Elm_Textpath_Group
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool elm_textpath_ellipsis_get(const Efl_Ui_Textpath *obj);
|
|
|
|
|
|
|
|
#endif
|