comparison src/shape_image.c @ 348:04d22dc38bc0

Change declaration of sh_image_set_img_data(). - x, y, w, h are not passed to sh_image_set_img_data() any more. - Applications should manage life-cycle of mb_img_data_t, paint_image_t do not manage it for applications any more.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 08 Mar 2009 22:24:54 +0800
parents b391722bf20e
children 3e84458968ec
comparison
equal deleted inserted replaced
347:b247beaac4f0 348:04d22dc38bc0
205 img->y = y; 205 img->y = y;
206 img->w = w; 206 img->w = w;
207 img->h = h; 207 img->h = h;
208 } 208 }
209 209
210 int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data, 210 int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data) {
211 co_aix x, co_aix y, co_aix w, co_aix h) {
212 int r; 211 int r;
213 212 sh_image_t *img = (sh_image_t *)shape;
214 r = _sh_image_set_img_data(shape, img_data, x, y, w, h); 213
214 r = _sh_image_set_img_data(shape, img_data,
215 img->x, img->y, img->w, img->h);
215 return r; 216 return r;
216 } 217 }
217 218
218 mb_img_data_t *sh_image_get_img_data(shape_t *shape) { 219 mb_img_data_t *sh_image_get_img_data(shape_t *shape) {
219 sh_image_t *img = (sh_image_t *)shape; 220 sh_image_t *img = (sh_image_t *)shape;