Mercurial > MadButterfly
comparison examples/menu/filebrowser.c @ 346:b391722bf20e
sh_image_t::img_data is managed by paint_image_t.
- sh_image_t should not try to free it.
- call sh_text_P_generate_layout() in sh_text_transform()
- remove calling from other functions.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 08 Mar 2009 14:44:41 +0800 |
parents | d04085404583 |
children | b247beaac4f0 |
comparison
equal
deleted
inserted
replaced
345:d04085404583 | 346:b391722bf20e |
---|---|
65 } | 65 } |
66 | 66 |
67 | 67 |
68 void mypreview(MyAppData *data, char *path) | 68 void mypreview(MyAppData *data, char *path) |
69 { | 69 { |
70 mb_img_data_t *img = MB_IMG_LDR_LOAD(rdman_img_ldr(MBAPP_RDMAN(myApp)), path); | 70 redraw_man_t *rdman = MBAPP_RDMAN(myApp); |
71 mb_img_ldr_t *ldr = rdman_img_ldr(rdman); | |
72 mb_img_data_t *img = MB_IMG_LDR_LOAD(ldr, path); | |
71 shape_t *obj = (shape_t *) MB_SPRITE_GET_OBJ(myApp->rootsprite, "previewimg"); | 73 shape_t *obj = (shape_t *) MB_SPRITE_GET_OBJ(myApp->rootsprite, "previewimg"); |
72 | 74 |
73 printf("Preview %s\n",path); | 75 printf("Preview %s\n",path); |
74 if (img) { | 76 if (img) { |
75 printf("image %d %d\n",img->w,img->h); | 77 printf("image %d %d\n",img->w,img->h); |