Mercurial > MadButterfly
diff src/paint.c @ 265:b42ee279669e
Change function name and add comments.
- sh_image_set_geometry() to replace sh_image_set().
- page "Image and Image Loader".
- comments.
diff -r 1ed06481e9ea img/image_n_ldr.dia
Binary file img/image_n_ldr.dia has changed
diff -r 1ed06481e9ea img/image_n_ldr.png
Binary file img/image_n_ldr.png has changed
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 24 Jan 2009 15:09:03 +0800 |
parents | 29acbd8a0dd0 |
children | 43900cae1d49 |
line wrap: on
line diff
--- a/src/paint.c Fri Jan 23 23:22:14 2009 +0800 +++ b/src/paint.c Sat Jan 24 15:09:03 2009 +0800 @@ -245,6 +245,10 @@ } +/*! \brief Using an image as a paint. + * + * This type of paints fill/stroke shapes with an image. + */ typedef struct _paint_image { paint_t paint; mb_img_data_t *img; @@ -273,6 +277,10 @@ free(paint); } +/*! \brief Create an image painter. + * + * Create a painter that fill/stroke shapes with an image. + */ paint_t *rdman_paint_image_new(redraw_man_t *rdman, mb_img_data_t *img) { paint_image_t *paint; @@ -323,6 +331,12 @@ return (paint_t *)paint; } +/*! \brief Setting transformation from user space to image space. + * + * This transformation matrix maps points drawed in user space to + * corresponding points in image space. It is used to resample + * the image to generate pixels of result image. + */ void paint_image_set_matrix(paint_t *paint, co_aix matrix[6]) { paint_image_t *img_paint = (paint_image_t *)paint; cairo_matrix_t cmatrix;