# HG changeset patch # User Thinker K.F. Li # Date 1236483549 -28800 # Node ID bb6e964da1c849e879166e02799bdc048c51b495 # Parent 5465ff071b47aa1d00092e18ec61a46f96f25618 sh_image_get_img_data() diff -r 5465ff071b47 -r bb6e964da1c8 include/mb_shapes.h --- 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); /* @} */ /* @} */ diff -r 5465ff071b47 -r bb6e964da1c8 src/shape_image.c --- 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; +}