ivug_image_image_size_get(pSetAsData->photocam, &image_w, &image_h); // Get original image size.
+ /*int degree = ivug_image_rotate_get(pSetAsData->photocam);
+ if(degree == 90 || degree == 270) //rotated
+ {
+ int temp = image_w;
+ image_w = image_h;
+ image_h = temp;
+ }*/
+
int px, py, pw, ph;
ivug_image_region_get(pSetAsData->photocam, &px, &py, &pw, &ph);
ivug_scissorbox_region_set(pSetAsData->crop.box, rect.x, rect.y, rect.w, rect.h);
ivug_scissorbox_attach(pSetAsData->crop.box, image); // Attach to photocam
+
+ int lcd_x, lcd_y, lcd_w, lcd_h;
+
+ evas_object_geometry_get(pSetAsData->contents_area, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ MSG_SETAS_MED("lcd_x=%d, lcd_y=%d, lcd_w=%d, lcd_h=%d", lcd_x, lcd_y, lcd_w, lcd_h);
+
+ ivug_scissorbox_boundary_set(pSetAsData->crop.box, px, lcd_y+py, pw, ph);
+
+ pSetAsData->prev_x = px; //lcd_x is wrong because transition effect
+ pSetAsData->prev_y = lcd_y+py;
+ pSetAsData->prev_w = pw;
+ pSetAsData->prev_h = ph;
}
static Eina_Bool _put_scissorbox_timer_cb(void *data)
"setasview.contents.swallow.notify"));
pSetAsData->notify = ivug_notify_static_create(pSetAsData->notify_area, IDS_CALLER_ID_NOTIFY, NOTIFY_ALIGN_BOTTOM);
-
- int x, y, w, h;
- ivug_image_region_get(pSetAsData->photocam, &x, &y, &w, &h);
-
- pSetAsData->prev_x = x;
- pSetAsData->prev_y = y;
- pSetAsData->prev_w = w;
- pSetAsData->prev_h = h;
}
int lcd_x, lcd_y, lcd_w, lcd_h;
- evas_object_geometry_get(obj, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
+ evas_object_geometry_get(pSetAsData->contents_area, &lcd_x, &lcd_y, &lcd_w, &lcd_h);
MSG_SETAS_MED("lcd_x=%d, lcd_y=%d, lcd_w=%d, lcd_h=%d", lcd_x, lcd_y, lcd_w, lcd_h);
int ph, pw;
dx *= zoom;
dy *= zoom;
- sx = (ext_w-img_w*zoom)/2 + dx;
- sy = (ext_h-img_h*zoom)/2 + dy;
+ sx = lcd_x + (ext_w-img_w*zoom)/2 + dx;
+ sy = lcd_y + (ext_h-img_h*zoom)/2 + dy;
+
+
+ int bound_x, bound_y, bound_w, bound_h;
- ivug_scissorbox_boundary_set(pSetAsData->crop.box, (ext_w-img_w*zoom)/2, (ext_h-img_h*zoom)/2, img_w*zoom, img_h*zoom);
+ bound_x = lcd_x+(ext_w-img_w*zoom)/2;
+ bound_y = lcd_y+(ext_h-img_h*zoom)/2;
+ bound_w = img_w*zoom;
+ bound_h = img_h*zoom;
+
+ ivug_scissorbox_boundary_set(pSetAsData->crop.box, bound_x, bound_y, bound_w, bound_h);
///////////////////////////////////////////////////////////////////
ivug_scissorbox_region_set(pSetAsData->crop.box, sx, sy, sw, sh);
- ivug_image_region_get(pSetAsData->photocam, &org_x, &org_y, &org_w, &org_h);
-
- MSG_SETAS_MED("org_x=%d, org_y=%d, org_w=%d, org_h=%d", org_x, org_y, org_w, org_h);
+ pSetAsData->prev_x = bound_x;
+ pSetAsData->prev_y = bound_y;
+ pSetAsData->prev_w = bound_w;
+ pSetAsData->prev_h = bound_h;
- pSetAsData->prev_x = org_x;
- pSetAsData->prev_y = org_y;
- pSetAsData->prev_w = org_w;
- pSetAsData->prev_h = org_h;
+ MSG_SETAS_MED("prev_x=%d, prev_y=%d, prev_w=%d, prev_h=%d", pSetAsData->prev_x, pSetAsData->prev_y, pSetAsData->prev_w, pSetAsData->prev_h);
}
static Evas_Event_Flags _finger_tap_end(void *data , void *event_info)
{
MSG_SETAS_HIGH("Hide");
elm_win_indicator_mode_set((Evas_Object*)ug_get_window(), ELM_WIN_INDICATOR_HIDE);
- evas_object_hide(pSetAsData->notify);
+ //evas_object_hide(pSetAsData->notify);
}
else
{
{
elm_win_indicator_mode_set((Evas_Object *)ug_get_window(), ELM_WIN_INDICATOR_SHOW);
}
- evas_object_show(pSetAsData->notify);
+ //evas_object_show(pSetAsData->notify);
}
pSetAsData->bShowMenu = !pSetAsData->bShowMenu;