diff 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
line wrap: on
line diff
--- a/src/shape_image.c	Sun Mar 08 21:57:15 2009 +0800
+++ b/src/shape_image.c	Sun Mar 08 22:24:54 2009 +0800
@@ -207,11 +207,12 @@
     img->h = h;
 }
 
-int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data,
-			   co_aix x, co_aix y, co_aix w, co_aix h) {
+int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data) {
     int r;
+    sh_image_t *img = (sh_image_t *)shape;
 
-    r = _sh_image_set_img_data(shape, img_data, x, y, w, h);
+    r = _sh_image_set_img_data(shape, img_data,
+			       img->x, img->y, img->w, img->h);
     return r;
 }