teansit - done. used ecore-pos-mapper for interpolation. should be

extended eventually. :)



SVN revision: 68025
This commit is contained in:
Carsten Haitzler 2012-02-16 12:09:32 +00:00
parent 98694d15ec
commit 2b79cf256c
2 changed files with 15 additions and 5 deletions

View File

@ -245,8 +245,8 @@ EAPI extern Elm_Version *elm_version;
#include <elm_table.h> // OK
#include <elm_theme.h> // OK
#include <elm_thumb.h> // OK
#include <elm_toolbar.h>
#include <elm_transit.h>
#include <elm_toolbar.h> // OK
#include <elm_transit.h> // OK
#include <elm_video.h>
#include <elm_web.h>
#include <elm_win.h>

View File

@ -336,14 +336,24 @@ _transit_animate_cb(void *data)
transit->progress = elapsed_time / duration;
switch (transit->tween_mode)
{
case ELM_TRANSIT_TWEEN_MODE_LINEAR:
transit->progress = ecore_animator_pos_map(transit->progress,
ECORE_POS_MAP_LINEAR,
0, 0);
case ELM_TRANSIT_TWEEN_MODE_ACCELERATE:
transit->progress = 1.0 - sin((ELM_PI / 2.0) + (transit->progress * ELM_PI / 2.0));
transit->progress = ecore_animator_pos_map(transit->progress,
ECORE_POS_MAP_ACCELERATE,
0, 0);
break;
case ELM_TRANSIT_TWEEN_MODE_DECELERATE:
transit->progress = sin(transit->progress * ELM_PI / 2.0);
transit->progress = ecore_animator_pos_map(transit->progress,
ECORE_POS_MAP_DECELERATE,
0, 0);
break;
case ELM_TRANSIT_TWEEN_MODE_SINUSOIDAL:
transit->progress = (1.0 - cos(transit->progress * ELM_PI)) / 2.0;
transit->progress = ecore_animator_pos_map(transit->progress,
ECORE_POS_MAP_SINUSOIDAL,
0, 0);
break;
default:
break;