EAPI Elm_Effect *elm_fx_rotation_add(Evas_Object *obj, float from_degree, float to_degree, Eina_Bool cw);
/* Rotation3D Fx */
- EAPI Elm_Effect *elm_fx_rotation3d_add(Evas_Object *obj, float from_degree, float to_degree, float* axis_dir, float* axis_pos, Eina_Bool cw);
+ EAPI Elm_Effect *elm_fx_rotation3d_add(Evas_Object *obj, float from_degree, float to_degree, float* axis_dir, float* axis_pos);
/* Color Fx */
EAPI Elm_Effect *elm_fx_color_add(Evas_Object *obj, unsigned int from_r, unsigned int from_g, unsigned int from_b, unsigned int from_a, unsigned int to_r, unsigned int to_g, unsigned int to_b, unsigned int to_a);
#include <Elementary.h>
+#include "elm_priv.h"
/**
*
struct _rotation3d
{
Evas_Object *obj;
- Eina_Bool cw;
float from[3];
float to[3];
float axis_pos[3];
degree[1] = rotation->from[1] + (float)(frame * rotation->to[1]);
degree[2] = rotation->from[2] + (float)(frame * rotation->to[2]);
- if (!rotation->cw) {
- degree[0] *= -1;
- degree[1] *= -1;
- degree[2] *= -1;
- }
-
evas_object_geometry_get(rotation->obj, &x, &y, &w, &h);
half_w = (float)w *0.5;
half_h = (float)h *0.5;
evas_map_util_3d_rotate(map, degree[0], degree[1], degree[2], rotation->axis_pos[0], rotation->axis_pos[1], rotation->axis_pos[2]);
- evas_map_util_3d_perspective(map, x + half_w, y + half_h, 0, 10000);
+ evas_map_util_3d_perspective(map, x + half_w, y + half_h, 0, 1000);
evas_object_map_enable_set(rotation->obj, EINA_TRUE);
evas_object_map_set(rotation->obj, map);
evas_map_free(map);
*/
EAPI Elm_Effect *
elm_fx_rotation3d_add(Evas_Object *obj, float from_degree, float to_degree,
- float* axis_dir, float* axis_pos, Eina_Bool cw)
+ float* axis_dir, float* axis_pos)
{
Elm_Effect *effect;
}
rotation->obj = obj;
- rotation->cw = cw;
rotation->from[0] = from_degree * axis_dir[0];
rotation->from[1] = from_degree * axis_dir[1];
rotation->from[2] = from_degree * axis_dir[2];
rotation->to[1] = (to_degree * axis_dir[1]) - rotation->from[1];
rotation->to[2] = (to_degree * axis_dir[2]) - rotation->from[2];
rotation->axis_pos[0] = axis_pos[0];
- rotation->axis_pos[1] = axis_pos[1] ;
- rotation->axis_pos[2] = axis_pos[2] ;
+ rotation->axis_pos[1] = axis_pos[1];
+ rotation->axis_pos[2] = axis_pos[2];
effect->begin_op = _elm_fx_rotation3d_begin;
effect->end_op = _elm_fx_rotation3d_end;