};
static void set_rotation(ui_view *this);
+static void set_rotation_3D(ui_view *this);
static void calc_coordinate(ui_view *this);
static void get_screen_resolution(ui_view *this);
evas_object_color_set(this->ui_element, r, g, b, this->alpha);
evas_object_show(this->ui_element);
}
+ else if(this->view->tbt_info->apptype == TBT_APP_UI_3D_ROTATE)
+ {
+ int r, g, b, a;
+
+ r = 0;
+ g = 255;
+ b = 0;
+ a = 250;
+
+ int offset;
+ #ifdef DEVICE_TYPE_MOBILE
+ offset = 100;
+ #else
+ offset = 50;
+ #endif
+ this->x = this->screen_width / 2 - offset;
+ this->y = this->screen_height / 2 - offset + this->toolbar_height;
+
+ Evas *evas = evas_object_evas_get(this->view->layout);
+ this->ui_element = evas_object_rectangle_add(evas);
+
+ evas_object_move(this->ui_element, this->x, this->y);
+ evas_object_resize(this->ui_element, 2*offset, 2*offset);
+ evas_object_color_set(this->ui_element, r, g, b, a);
+ evas_object_show(this->ui_element);
+ }
+
+
this->timer = ecore_timer_add(1, _ui_view_timer_cb, this);
return this;
evas_object_map_enable_set(o, EINA_TRUE);
evas_map_free(m);
}
+/**
+ * @function set_rotation_3D
+ * @since_tizen 2.3
+ * @description Set Rotation
+ * @parameter ui_view*: Ui View Pointer
+ * @return static void
+ */
+static void set_rotation_3D(ui_view *this)
+{
+ Evas_Coord x, y, w, h;
+ double degree = 45;
+ Evas_Object *o;
+ o = this->ui_element;
+
+ if(this->rotation < 0) this->rotation=-this->rotation;
+ if(this->rotation>=360) this->rotation=this->rotation%360;
+ evas_object_geometry_get(o, &x, &y, &w, &h);
+ Evas_Map *m = evas_map_new(4);
+ // Set the object image UV values to map
+ evas_map_util_points_populate_from_object_full(m, o, 0);
+ // Rotate by 45 degrees on object's local Y axis
+ evas_map_util_3d_rotate(m, this->rotation, degree, 0, x + w / 2, y + h / 2, 0);
+ // Set the perspective transform
+ evas_map_util_3d_perspective(m, x + w / 2, y + h / 2, 0, 400);
+
+ evas_object_map_set(o, m);
+ evas_object_map_enable_set(o, EINA_TRUE);
+ evas_map_free(m);
+}
/**
* @function get_screen_resolution
set_rotation(this);
this->rotation += 36;
}
+ else if(this->view->tbt_info->apptype == TBT_APP_UI_3D_ROTATE)
+ {
+ set_rotation_3D(this);
+ this->rotation += 36;
+ }
else if(this->view->tbt_info->apptype == TBT_APP_UI_FONT)
{
evas_object_color_set(this->ui_element, rand()%256,rand()%256,rand()%256, 255);