2019-03-08 06:55:43 -08:00
|
|
|
enum @beta Efl.Ui.Textpath_Direction {
|
2017-08-31 02:47:03 -07:00
|
|
|
[[Textpath direction]]
|
|
|
|
cw, [[Clockwise]]
|
2019-05-20 22:31:12 -07:00
|
|
|
ccw, [[Counter-clockwise]]
|
|
|
|
cw_center, [[Clockwise, middle of text will be at start angle @since 1.23]]
|
|
|
|
ccw_center [[Counter-clockwise, middle of text will be at start angle @since 1.23]]
|
2017-08-29 03:04:15 -07:00
|
|
|
}
|
|
|
|
|
2019-02-28 07:23:11 -08:00
|
|
|
class @beta Efl.Ui.Textpath extends Efl.Ui.Layout_Base implements Efl.Text, Efl.Gfx.Path
|
2017-08-29 03:04:15 -07:00
|
|
|
{
|
|
|
|
[[Efl Ui Textpath class]]
|
|
|
|
methods {
|
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
|
|
|
circular_set {
|
|
|
|
[[Set a circle with given radius and start angle.
|
|
|
|
The center of the circle will be decided by the object center position.]]
|
2017-08-29 03:04:15 -07:00
|
|
|
params {
|
2017-08-31 02:58:52 -07:00
|
|
|
@in radius: double; [[Radius of the circle]]
|
|
|
|
@in start_angle: double; [[Start angle of the circle]]
|
2018-04-09 08:23:34 -07:00
|
|
|
@in direction: Efl.Ui.Textpath_Direction; [[Textpath direction]]
|
2017-08-29 03:04:15 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property slice_number {
|
|
|
|
[[The number of slices. The larger the number of slice_num is,
|
|
|
|
The better the text follows the path.]]
|
|
|
|
values {
|
2017-08-31 02:58:52 -07:00
|
|
|
slice_no: int; [[Number of slices]]
|
2017-08-29 03:04:15 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property ellipsis {
|
|
|
|
[[Control the ellipsis behavior of the textpath.]]
|
|
|
|
set {
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
ellipsis: bool; [[To ellipsis text or not]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
implements {
|
|
|
|
Efl.Object.constructor;
|
|
|
|
Efl.Object.destructor;
|
efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED
Summary:
Here is an additional optmization patch for removing
unnecessary updation of path,
For instance, let's assume this scenario:
If one vg object has 20 path nodes(shapes),
and every single nodes would have 50 path changes.
(like, append_cubic, append_rect, append_xxx ...);
There would 1000 events triggering.
Furthermore, if there are 20 vector objects in one view,
hese events would be triggered 20000 in one frame.
It's insane, actually I could figured out that happens.
and it took a lot of cpu consumption in some vector usages.
efl_gfx_path_commit() is my idea to avoid this.
When path is ready, the path need to get this api call in the last
to make object changed properly.
@feature
Reviewers: #committers, cedric
Reviewed By: #committers, cedric
Subscribers: segfaultxavi, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7494
2018-12-27 19:20:15 -08:00
|
|
|
Efl.Gfx.Path.commit;
|
2017-08-29 03:04:15 -07:00
|
|
|
Efl.Canvas.Group.group_calculate;
|
|
|
|
Efl.Text.text {get; set;}
|
2018-05-03 16:34:17 -07:00
|
|
|
Efl.Part.part_get;
|
2018-01-07 20:55:35 -08:00
|
|
|
Efl.Ui.Widget.theme_apply;
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl.Gfx.Entity.position { set; }
|
|
|
|
Efl.Gfx.Entity.size { set; }
|
2017-08-29 03:04:15 -07:00
|
|
|
}
|
|
|
|
}
|