2010/7/27 Hyun Park <hyuny...@gmail.com> > Hi, All. > > I'm writing a kind of image viewer application. > This app has a image array view and is scrolled by touch interface one by > one by horizentally. > > I'm refering to 'test_photo.c" in Elementary test app, but I hit the wall > because of some problems like below. > > ========================= > #include <Elementary.h> > > #define MY_WIDTH 240//480 > #define MY_HEIGHT 320//640 > > static void win_del(void *data, Evas_Object *obj, void *event_info) > { > elm_exit(); > } > > EAPI int elm_main(int argc, char **argv) > { > Evas_Object *win, *bg, *sc, *tb, *ph; > int i, j; > char buf[PATH_MAX]; > > const char *img[9] = > { > "panel_01.jpg", > "plant_01.jpg", > "rock_01.jpg", > "rock_02.jpg", > "sky_01.jpg", > "sky_02.jpg", > "sky_03.jpg", > "sky_04.jpg", > "wood_01.jpg" > }; > > win = elm_win_add(NULL, "photo", ELM_WIN_BASIC); > elm_win_title_set(win, "Photo"); > elm_win_autodel_set(win, 1); > evas_object_smart_callback_add(win, "delete,request", win_del, NULL); > > bg = elm_bg_add(win); > evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); > elm_win_resize_object_add(win, bg); > evas_object_show(bg); > > tb = elm_table_add(win); > evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); > //elm_table_padding_set(tb, 0, 0); > > for (i = 0; i < 9; i++) > { > ph = elm_photo_add(win); > snprintf(buf, sizeof(buf), "images/%s", img[i]); > > elm_photo_file_set(ph, buf); > evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > evas_object_size_hint_align_set(ph, EVAS_HINT_FILL, EVAS_HINT_FILL); > elm_photo_size_set(ph, MY_HEIGHT); > elm_table_pack(tb, ph, i, 0, 1, 1); > evas_object_show(ph); > } > > sc = elm_scroller_add(win); > evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, > EVAS_HINT_EXPAND); > elm_win_resize_object_add(win, sc); > > elm_scroller_content_set(sc, tb); > evas_object_show(tb); > evas_object_show(sc); > > evas_object_resize(win, MY_WIDTH, MY_HEIGHT); > evas_object_show(win); > > elm_run(); > elm_shutdown(); > return 0; > } > ELM_MAIN() > ================================= > > Firstly, a resized image seems too rough, for example, > I re-sized the original 640x640 resolution image to 240x320 such as above > code. > but it seems that more small size image(resolution) is enlarged to 240x320 > to the contrary. > (in sample applicaiton, all images are scale down to 80 pixel, so i > couldn't > find this problem) > > You use elm_photo ? The grid resize the item, then if you do not want increase the size of the photo, this is the job of the item. Maybe you can try elm_photo_fill_inside_set(ph, EINA_TRUE); see: http://trac.enlightenment.org/e/browser/trunk/TMP/st/elementary/src/bin/test_photo.c
> Secondly, I want this horozontal images has no (or very small) 'panding' > pixel each other but > elm_table_padding_set(tb, 0, 0) doesn't work. I can't understand why... > I think the padding you see is in the items and not between. > > Lastly, How can i hide - automatically displayed - scrollbar? > you can do this in elm_scroller, see Elm_Scroller_Policy. > If i scrolled image table, vertical or horozontal scrollbar is abruptly > come > out. > You means the scrollbar disapear while you scroll ? > > > Thank you for you help in advance. > > - Hyun > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- Regards. ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel