comparison 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
comparison
equal deleted inserted replaced
355:958b67d911db 356:3e84458968ec
15 co_comp_t r, co_comp_t g, 15 co_comp_t r, co_comp_t g,
16 co_comp_t b, co_comp_t a); 16 co_comp_t b, co_comp_t a);
17 extern void paint_color_get(paint_t *paint, 17 extern void paint_color_get(paint_t *paint,
18 co_comp_t *r, co_comp_t *g, 18 co_comp_t *r, co_comp_t *g,
19 co_comp_t *b, co_comp_t *a); 19 co_comp_t *b, co_comp_t *a);
20 #define paint_init(_paint, _prepare, _free) \ 20 #define paint_init(_paint, _type, _prepare, _free) \
21 do { \ 21 do { \
22 (_paint)->flags = 0; \ 22 (_paint)->pnt_type = _type; \
23 (_paint)->prepare = _prepare; \ 23 (_paint)->flags = 0; \
24 (_paint)->free = _free; \ 24 (_paint)->prepare = _prepare; \
25 STAILQ_INIT((_paint)->members); \ 25 (_paint)->free = _free; \
26 (_paint)->pnt_next = NULL; \ 26 STAILQ_INIT((_paint)->members); \
27 } while(0) 27 (_paint)->pnt_next = NULL; \
28 } while(0)
28 #define paint_destroy(_paint) 29 #define paint_destroy(_paint)
29 30
30 31
31 typedef struct _grad_stop { 32 typedef struct _grad_stop {
32 co_aix offset; 33 co_aix offset;
59 extern paint_t *rdman_paint_image_new(redraw_man_t *rdman, 60 extern paint_t *rdman_paint_image_new(redraw_man_t *rdman,
60 mb_img_data_t *img); 61 mb_img_data_t *img);
61 /*! \brief Set a matrix to transform image. 62 /*! \brief Set a matrix to transform image.
62 */ 63 */
63 extern void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]); 64 extern void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]);
65 extern void paint_image_get_size(paint_t *paint, int *w, int *h);
64 66
65 #endif /* __PAINT_H_ */ 67 #endif /* __PAINT_H_ */