replace magic numbers
authorHyoyoung Chang <hyoyoung.chang@samsung.com>
Tue, 9 Nov 2010 04:43:31 +0000 (04:43 +0000)
committerHyoyoung Chang <hyoyoung.chang@samsung.com>
Tue, 9 Nov 2010 04:43:31 +0000 (04:43 +0000)
src/clipdrawer.c
src/scrcapture.c

index 849ee52..78b771f 100644 (file)
@@ -399,8 +399,8 @@ int clipdrawer_init(void *data)
        // for elm_check, elm_list
        elm_theme_extension_add(NULL, APP_EDJ_FILE);
 
-       cdy = (1.0*CLIPDRAWER_HEIGHT/800)*ad->root_h;
-       cdw = (1.0*CLIPDRAWER_POS_Y/800*1.0)*ad->root_h;
+       cdy = (1.0*CLIPDRAWER_HEIGHT/SCREEN_HEIGHT)*ad->root_h;
+       cdw = (1.0*CLIPDRAWER_POS_Y/SCREEN_HEIGHT)*ad->root_h;
 
        evas_object_resize(ad->win_main, ad->root_w, (int)cdy);
        evas_object_move(ad->win_main, CLIPDRAWER_POS_X, (int)cdw);
index 299fa26..ea4d7aa 100644 (file)
@@ -76,7 +76,8 @@ static Eina_Bool capture_current_screen(void *data)
        DTRACE("capture current screen\n");
 
        int width, height;
-       width = 480; height = 800;
+       width = ad->root_w;
+       height = ad->root_h;
        capimginfo->imgdata = malloc(sizeof(char) * width*height*4);
        capimginfo->eo = evas_object_image_add(ad->evas);