#include <Elementary.h>
#include "elm_priv.h"
+#include "els_scroller.h"
+
+/*
+ * TODO (maybe - optional future stuff):
+ *
+ * 1. wrap photo in theme edje so u can have styling around photo (like white
+ * photo bordering).
+ * 2. exif handling
+ * 3. rotation flags in exif handling (nasty! should have rot in evas)
+ */
typedef struct _Widget_Data Widget_Data;
typedef struct _Pan Pan;
g->grid[tn].wd = wd;
g->grid[tn].img =
evas_object_image_add(evas_object_evas_get(obj));
+ evas_object_image_load_orientation_set(g->grid[tn].img, EINA_TRUE);
evas_object_image_scale_hint_set
(g->grid[tn].img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
evas_object_pass_events_set(g->grid[tn].img, EINA_TRUE);
wd->tsize = 512;
wd->img = evas_object_image_add(e);
+ evas_object_image_load_orientation_set(wd->img, EINA_TRUE);
evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_DOWN,
_mouse_down, obj);
if ((wd->size.imw < 1) || (wd->size.imh < 1))
{
wd->size.nw = 0;
- wd->size.nw = 0;
+ wd->size.nh = 0;
}
else
{
rx = (x * wd->size.w) / wd->size.imw;
ry = (y * wd->size.h) / wd->size.imh;
rw = (w * wd->size.w) / wd->size.imw;
- rh = (w * wd->size.h) / wd->size.imh;
+ rh = (h * wd->size.h) / wd->size.imh;
if (rw < 1) rw = 1;
if (rh < 1) rh = 1;
if ((rx + rw) > wd->size.w) rx = wd->size.w - rw;
rx = (x * wd->size.w) / wd->size.imw;
ry = (y * wd->size.h) / wd->size.imh;
rw = (w * wd->size.w) / wd->size.imw;
- rh = (w * wd->size.h) / wd->size.imh;
+ rh = (h * wd->size.h) / wd->size.imh;
if (rw < 1) rw = 1;
if (rh < 1) rh = 1;
if ((rx + rw) > wd->size.w) rx = wd->size.w - rw;