# HG changeset patch # User wycc # Date 1302499065 -28800 # Node ID ee3e4c996a5171c696541f4dc5f068c952a816e1 # Parent 167873cd35c52c562711c98deff1f48b7c696ba1# Parent 7bd6c0e88ec83c5d13e04d9282c6e93a709c9d14 Merge diff -r 167873cd35c5 -r ee3e4c996a51 src/paint.c --- a/src/paint.c Mon Apr 11 13:17:05 2011 +0800 +++ b/src/paint.c Mon Apr 11 13:17:45 2011 +0800 @@ -282,9 +282,7 @@ static void paint_image_prepare(paint_t *paint, mbe_t *cr, shape_t *sh) { paint_image_t *paint_img = (paint_image_t *)paint; - mb_img_data_t *img_data; - - img_data = paint_img->img; + mbe_set_source(cr, paint_img->ptn); } @@ -296,6 +294,7 @@ img_data = paint_img->img; MB_IMG_DATA_FREE(img_data); paint_destroy(&paint_img->paint); + mbe_pattern_destroy(paint_img->ptn); elmpool_elm_free(rdman->paint_image_pool, paint_img); } diff -r 167873cd35c5 -r ee3e4c996a51 src/shape_image.c --- a/src/shape_image.c Mon Apr 11 13:17:05 2011 +0800 +++ b/src/shape_image.c Mon Apr 11 13:17:45 2011 +0800 @@ -59,6 +59,7 @@ co_aix x, y; co_aix w, h; co_aix poses[4][2]; + co_aix sample_matrix[6]; redraw_man_t *rdman; } sh_image_t; @@ -120,7 +121,6 @@ paint_t *paint; co_aix (*poses)[2]; co_aix img_matrix[6]; - co_aix rev_matrix[6]; co_aix x_factor, y_factor; int img_w, img_h; int i; @@ -164,8 +164,7 @@ img_matrix[3] *= y_factor; img_matrix[4] *= y_factor; } - compute_reverse(img_matrix, rev_matrix); - paint_image_set_matrix(sh_get_fill(shape), rev_matrix); + compute_reverse(img_matrix, img->sample_matrix); } /*! \brief Draw image for an image shape. @@ -175,6 +174,8 @@ void sh_image_draw(shape_t *shape, mbe_t *cr) { sh_image_t *img = (sh_image_t *)shape; + paint_image_set_matrix(sh_get_fill(shape), img->sample_matrix); + mbe_move_to(cr, img->poses[0][0], img->poses[0][1]); mbe_line_to(cr, img->poses[1][0], img->poses[1][1]); mbe_line_to(cr, img->poses[2][0], img->poses[2][1]);