diff include/mb_paint.h @ 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 29acbd8a0dd0
children 7f7855df2af0
line wrap: on
line diff
--- a/include/mb_paint.h	Mon Mar 09 01:35:19 2009 +0800
+++ b/include/mb_paint.h	Mon Mar 09 23:05:57 2009 +0800
@@ -17,14 +17,15 @@
 extern void paint_color_get(paint_t *paint,
 			    co_comp_t *r, co_comp_t *g,
 			    co_comp_t *b, co_comp_t *a);
-#define paint_init(_paint, _prepare, _free)	\
-     do {					\
-	 (_paint)->flags = 0;			\
-	 (_paint)->prepare = _prepare;		\
-	 (_paint)->free = _free;		\
-	 STAILQ_INIT((_paint)->members);	\
-	 (_paint)->pnt_next = NULL;		\
-     } while(0)
+#define paint_init(_paint, _type, _prepare, _free)	\
+    do {						\
+	(_paint)->pnt_type = _type;			\
+	(_paint)->flags = 0;				\
+	(_paint)->prepare = _prepare;			\
+	(_paint)->free = _free;				\
+	STAILQ_INIT((_paint)->members);			\
+	(_paint)->pnt_next = NULL;			\
+    } while(0)
 #define paint_destroy(_paint)
 
 
@@ -61,5 +62,6 @@
 /*! \brief Set a matrix to transform image.
  */
 extern void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]);
+extern void paint_image_get_size(paint_t *paint, int *w, int *h);
 
 #endif /* __PAINT_H_ */