Transit¶
Widget description¶
Transit is designed to apply various animated transition effects to
Evas_Object
, such like translation, rotation, etc. For using these
effects, create a Transit
and add the desired transition effects.
Once the effects are added into transit, they will be automatically managed (their callback will be called for the set duration and they will be deleted upon completion).
Example:
from efl.elementary.transit import Transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE
t = Transit()
t.object_add(obj)
t.effect_translation_add(0, 0, 280, 280)
t.duration = 1
t.auto_reverse = True
t.tween_mode = ELM_TRANSIT_TWEEN_MODE_DECELERATE
t.repeat_times = 3
Some transition effects are used to change the properties of objects. They are:
effect_translation_add()
effect_color_add()
effect_rotation_add()
effect_wipe_add()
effect_zoom_add()
effect_resizing_add()
Other transition effects are used to make one object disappear and another object appear on its place. These effects are:
effect_flip_add()
effect_resizable_flip_add()
effect_fade_add()
effect_blend_add()
It’s also possible to make a transition chain with
chain_transit_add()
.
Warning
We strongly recommend to use elm_transit just when edje can not do the trick. Edje is better at handling transitions than Elm_Transit. Edje has more flexibility and animations can be manipulated inside the theme.
Enumerations¶
Flip effects¶
- efl.elementary.ELM_TRANSIT_EFFECT_FLIP_AXIS_X¶
Flip on X axis
- efl.elementary.ELM_TRANSIT_EFFECT_FLIP_AXIS_Y¶
Flip on Y axis
Wipe effects¶
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_DIR_LEFT¶
Wipe to the left
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT¶
Wipe to the right
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_DIR_UP¶
Wipe up
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN¶
Wipe down
Wipe types¶
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE¶
Hide the object during the animation.
- efl.elementary.ELM_TRANSIT_EFFECT_WIPE_TYPE_SHOW¶
Show the object during the animation.
Tween modes¶
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_LINEAR¶
Constant speed
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL¶
Starts slow, increase speed over time, then decrease again and stop slowly
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_DECELERATE¶
Starts fast and decrease speed over time
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_ACCELERATE¶
Starts slow and increase speed over time
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP¶
Start at gradient v1, interpolated via power of v2 curve
Added in version 1.13.
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_BOUNCE¶
Start at 0.0 then “drop” like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1
Added in version 1.13.
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_SPRING¶
Start at 0.0 then “wobble” like a spring rest position 1.0, and wobble v2 times, with decay factor of v1
Added in version 1.13.
- efl.elementary.ELM_TRANSIT_TWEEN_MODE_BEZIER_CURVE¶
Follow the cubic-bezier curve calculated with the control points (x1, y1), (x2, y2)
Added in version 1.13.