Page MenuHomePhabricator

Efl.Ui.Animation_View: Implement Min/Max_Progress/Frame_Set/Get
ClosedPublic

Authored by jsuya on Jan 29 2019, 12:33 AM.

Details

Reviewers
Hermet
Summary

Implements APIs to set the range when playing.
If we set progress or frame's min and max, it will play within the set value.
keyframe sets the value based on min/max, not the whole frame.

void efl_ui_animation_view_min_progress_set(Eo *obj, double min_progress);
double efl_ui_animation_view_min_progress_get(const Eo *obj);
void efl_ui_animation_view_max_progress_set(Eo *obj, double max_progress);
double efl_ui_animation_view_max_progress_get(const Eo *obj);
void efl_ui_animation_view_min_frame_set(Eo *obj, int min_frame);
int efl_ui_animation_view_min_frame_get(const Eo *obj);
void efl_ui_animation_view_max_frame_set(Eo *obj, int max_frame);
int efl_ui_animation_view_max_frame_get(const Eo *obj);

Test Plan

Evas_Object *anim_view = elm_animation_view_add(win);
elm_animation_view_auto_repeat_set(anim_view, 1);
elm_animation_view_file_set(anim_view, "a.json", NULL);
elm_animation_view_play(anim_view);
evas_object_show(anim_view);

evas_object_size_hint_align_set(anim_view, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(anim_view, 1, 1);

elm_animation_view_min_progress_set(anim_view, 0.3);
elm_animation_view_max_progress_set(anim_view, 0.8);

//or
elm_animation_view_min_frame_set(anim_view, 5);
elm_animation_view_max_frame_set(anim_view, 15);

Diff Detail

Repository
rEFL core/efl
Branch
devs/hermet/lottie
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9223
Build 7879: arc lint + arc unit
jsuya created this revision.Jan 29 2019, 12:33 AM
jsuya requested review of this revision.Jan 29 2019, 12:33 AM
Hermet accepted this revision.Jan 29 2019, 2:01 AM
This revision is now accepted and ready to land.Jan 29 2019, 2:01 AM
Hermet closed this revision.Jan 29 2019, 2:01 AM