diff tools/mb_c_source.m4 @ 356:3e84458968ec

Move mb_img_data_t out from argument list of rdman_shape_image_new(). - Application should specify content of sh_image_t by fill the shape with a paint_image_t.
author Thinker K.F. Li <thinker@branda.to>
date Mon, 09 Mar 2009 23:05:57 +0800
parents 700954870cee
children bf1addb037b7
line wrap: on
line diff
--- a/tools/mb_c_source.m4	Mon Mar 09 01:35:19 2009 +0800
+++ b/tools/mb_c_source.m4	Mon Mar 09 23:05:57 2009 +0800
@@ -127,9 +127,10 @@
 ]])
 
 define([S_ADD_IMAGE],[[
-    obj->$1_img_data = MB_IMG_LDR_LOAD(img_ldr, "$2");
-    obj->$1 = rdman_shape_image_new(rdman, obj->$1_img_data,
+    obj->$1_paint_img = rdman_img_ldr_load_paint(rdman, "$2");
+    obj->$1 = rdman_shape_image_new(rdman,
 				    $3, $4, $5, $6);
+    rdman_paint_fill(rdman, obj->$1_paint_img, obj->$1);
     rdman_add_shape(rdman, obj->$1, obj->$7);
 ]])
 define([S_PANGO_BEGIN_TEXT],[[
@@ -300,7 +301,7 @@
 
 define([F_ADD_IMAGE],[[
     rdman_shape_free(rdman, obj->$1);
-    MB_IMG_DATA_FREE(obj->$1_img_data);
+    rdman_paint_free(rdman, obj->$1_paint_img);
 ]])
 define([F_PANGO_BEGIN_TEXT],[[
     rdman_shape_free(rdman, obj->$1);