aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_photocam.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-15 15:04:26 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-15 15:05:32 +0900
commit2f846fca27c14c48ea3923c90321cb25676ce3d4 (patch)
tree1819fff5849f37615b0562c75b3e202113552d5c /legacy/elementary/src/bin/test_photocam.c
parentctxpopup: set smart member relationship for objects in ctxpopup (diff)
downloadefl-2f846fca27c14c48ea3923c90321cb25676ce3d4.tar.gz
test_photocam: Support zoom in and out with more condition checks.
Now zoom in and out work sanely.
Diffstat (limited to 'legacy/elementary/src/bin/test_photocam.c')
-rw-r--r--legacy/elementary/src/bin/test_photocam.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/legacy/elementary/src/bin/test_photocam.c b/legacy/elementary/src/bin/test_photocam.c
index a715249173..dbab32d220 100644
--- a/legacy/elementary/src/bin/test_photocam.c
+++ b/legacy/elementary/src/bin/test_photocam.c
@@ -132,9 +132,21 @@ my_bt_zoom_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
double zoom;
zoom = elm_photocam_zoom_get(data);
- zoom -= 0.5;
+ if (zoom > 1.5)
+ zoom -= 0.5;
+ else if ((zoom > 1.0) && (zoom <= 1.5))
+ zoom = 1.0;
+ else if (zoom == 1.0)
+ zoom = 0.8;
+ else
+ zoom = zoom * zoom;
+
elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_MANUAL);
- if (zoom >= (1.0 / 32.0)) elm_photocam_zoom_set(data, zoom);
+ if (zoom >= (1.0 / 32.0))
+ {
+ printf("zoom %f\n", zoom);
+ elm_photocam_zoom_set(data, zoom);
+ }
}
static void
@@ -145,7 +157,11 @@ my_bt_zoom_out(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
zoom = elm_photocam_zoom_get(data);
zoom += 0.5;
elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_MANUAL);
- if (zoom <= 256.0) elm_photocam_zoom_set(data, zoom);
+ if (zoom <= 256.0)
+ {
+ printf("zoom %f\n", zoom);
+ elm_photocam_zoom_set(data, zoom);
+ }
}
static void