diff src/paint.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 43900cae1d49
children 3e84458968ec
line wrap: on
line diff
--- a/src/paint.c	Sun Mar 08 21:57:15 2009 +0800
+++ b/src/paint.c	Sun Mar 08 22:24:54 2009 +0800
@@ -272,7 +272,6 @@
     
     cairo_surface_destroy(paint_img->surf);
     img_data = paint_img->img;
-    MB_IMG_DATA_FREE(img_data);
     paint_destroy(&paint_img->paint);
     free(paint);
 }
@@ -280,6 +279,9 @@
 /*! \brief Create an image painter.
  *
  * Create a painter that fill/stroke shapes with an image.
+ *
+ * \param img is image data return by image load.  Life-cycle of img
+ *            is managed by application code.
  */
 paint_t *rdman_paint_image_new(redraw_man_t *rdman,
 			       mb_img_data_t *img) {