Mercurial > MadButterfly
comparison src/shape_image.c @ 473:ba64f928542b Android_Skia
Remove mbe_matrix_t type.
The struct mbe_matrix_t is defined in a layout accoriding definition
of Cairo. It is not feasible for all graphic engine. Now, we start
supporting of other graphic engine; Skia, so use type of (co_aix[6])
defined and used by MadButterfly intead of mbe_matrix_t. And, bridges
of graphic engines are responsible for translate matrics into the
matrix type of the graphic enigne.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 12 Nov 2009 21:32:58 +0800 |
parents | a417fd980228 |
children | cbad519226d4 |
comparison
equal
deleted
inserted
replaced
472:4254eaa699d0 | 473:ba64f928542b |
---|---|
102 paint_t *paint; | 102 paint_t *paint; |
103 co_aix (*poses)[2]; | 103 co_aix (*poses)[2]; |
104 co_aix img_matrix[6]; | 104 co_aix img_matrix[6]; |
105 co_aix x_factor, y_factor; | 105 co_aix x_factor, y_factor; |
106 int img_w, img_h; | 106 int img_w, img_h; |
107 mbe_matrix_t cmatrix; | |
108 int i; | 107 int i; |
109 | 108 |
110 poses = img->poses; | 109 poses = img->poses; |
111 poses[0][0] = img->x; | 110 poses[0][0] = img->x; |
112 poses[0][1] = img->y; | 111 poses[0][1] = img->y; |
156 * \note Image is not rescaled for size of the shape. | 155 * \note Image is not rescaled for size of the shape. |
157 */ | 156 */ |
158 void sh_image_draw(shape_t *shape, mbe_t *cr) { | 157 void sh_image_draw(shape_t *shape, mbe_t *cr) { |
159 sh_image_t *img = (sh_image_t *)shape; | 158 sh_image_t *img = (sh_image_t *)shape; |
160 mbe_pattern_t *saved_source; | 159 mbe_pattern_t *saved_source; |
161 mbe_matrix_t matrix, saved_matrix; | |
162 co_aix *aggr; | 160 co_aix *aggr; |
163 | 161 |
164 mbe_move_to(cr, img->poses[0][0], img->poses[0][1]); | 162 mbe_move_to(cr, img->poses[0][0], img->poses[0][1]); |
165 mbe_line_to(cr, img->poses[1][0], img->poses[1][1]); | 163 mbe_line_to(cr, img->poses[1][0], img->poses[1][1]); |
166 mbe_line_to(cr, img->poses[2][0], img->poses[2][1]); | 164 mbe_line_to(cr, img->poses[2][0], img->poses[2][1]); |