summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_macros.h
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2016-05-19 11:13:04 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2016-05-19 11:13:36 +0900
commite0bbc2aceddce568be3d702cd6d8d25ac04a16ea (patch)
tree35c2a5ce97a32bfff42942e4fe13e9d3de30b0be /src/lib/elementary/elm_macros.h
parent3940ff7f8bf625b0dd87a2c0eeae76e3b2e3ca7f (diff)
sclae : add the feature for rounding off
Add the feature for rounding off to the nearest in ELM_SCALE_SIZE macro. It makes to be more close to calculated value.
Diffstat (limited to 'src/lib/elementary/elm_macros.h')
-rw-r--r--src/lib/elementary/elm_macros.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_macros.h b/src/lib/elementary/elm_macros.h
index 61b3377..0ce9b6c 100644
--- a/src/lib/elementary/elm_macros.h
+++ b/src/lib/elementary/elm_macros.h
@@ -1,7 +1,7 @@
1/* handy macros */ 1/* handy macros */
2#define ELM_RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy))) 2#define ELM_RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy)))
3#define ELM_PI 3.14159265358979323846 3#define ELM_PI 3.14159265358979323846
4#define ELM_SCALE_SIZE(x) (int)(((double)(x) * elm_config_scale_get()) / elm_app_base_scale_get()) 4#define ELM_SCALE_SIZE(x) ((int)(((double)(x) * elm_config_scale_get()) / elm_app_base_scale_get() + 0.5))
5 5
6// checks if the point(xx, yy) stays out of the rectangle(x, y, w, h) area. 6// checks if the point(xx, yy) stays out of the rectangle(x, y, w, h) area.
7#define ELM_RECTS_POINT_OUT(x, y, w, h, xx, yy) (((xx) < (x)) || ((yy) < (y)) || ((xx) > ((x) + (w))) || ((yy) > ((y) + (h)))) 7#define ELM_RECTS_POINT_OUT(x, y, w, h, xx, yy) (((xx) < (x)) || ((yy) < (y)) || ((xx) > ((x) + (w))) || ((yy) > ((y) + (h))))