Mercurial > MadButterfly
changeset 343:bb6e964da1c8
sh_image_get_img_data()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 08 Mar 2009 11:39:09 +0800 |
parents | 5465ff071b47 |
children | d04085404583 |
files | include/mb_shapes.h src/shape_image.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mb_shapes.h Sun Mar 08 10:13:44 2009 +0800 +++ b/include/mb_shapes.h Sun Mar 08 11:39:09 2009 +0800 @@ -244,6 +244,7 @@ co_aix w, co_aix h); extern int sh_image_set_img_data(shape_t *shape, mb_img_data_t *img_data, co_aix x, co_aix y, co_aix w, co_aix h); +extern mb_img_data_t *sh_image_get_img_data(shape_t *shape); /* @} */ /* @} */
--- a/src/shape_image.c Sun Mar 08 10:13:44 2009 +0800 +++ b/src/shape_image.c Sun Mar 08 11:39:09 2009 +0800 @@ -210,3 +210,10 @@ return OK; } +mb_img_data_t *sh_image_get_img_data(shape_t *shape) { + sh_image_t *img = (sh_image_t *)shape; + + ASSERT(shape->obj.obj_type == MBO_IMAGE); + + return img->img_data; +}