Mercurial > MadButterfly
diff include/mb_types.h @ 257:50d253d0fcba
Simple image loader and image shape.
- img_ldr.c is a simple image loader that rooted on a directory
specified when a loader instance been created.
- sh_image_t is corresponding shape of image tag in SVG.
- This changeset is still buggy. It need more testing.
- svg2code.py is not ready for image tag.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 15 Jan 2009 16:46:47 +0800 |
parents | bd8ea44b421e |
children | 29acbd8a0dd0 |
line wrap: on
line diff
--- a/include/mb_types.h Thu Jan 15 02:15:35 2009 +0800 +++ b/include/mb_types.h Thu Jan 15 16:46:47 2009 +0800 @@ -40,7 +40,8 @@ MBO_SHAPES=0x1000, /*! \note Don't touch this. */ MBO_PATH, MBO_TEXT, - MBO_RECT + MBO_RECT, + MBO_IMAGE }; #define MBO_CLASS_MASK 0xf000 #define MBO_CLASS(x) (((mb_obj_t *)(x))->obj_type & MBO_CLASS_MASK) @@ -197,6 +198,7 @@ } while(0) #define coord_show(co) do { co->flags &= ~COF_HIDDEN; } while(0) #define coord_get_mouse_event(coord) ((coord)->mouse_event) +#define coord_get_aggr_matrix(coord) ((coord)->aggr_matrix) #define FOR_COORDS_POSTORDER(coord, cur) \ for((cur) = postorder_coord_subtree((coord), NULL); \ (cur) != NULL; \ @@ -270,6 +272,7 @@ #define sh_clear_flags(sh, mask) geo_clear_flags(sh_get_geo(sh), mask) #define sh_pos_is_in(sh, x, y) geo_pos_is_in(sh_get_geo(sh), x, y) #define sh_get_area(sh) geo_get_area(sh_get_geo(sh)) +#define sh_get_coord(sh) ((sh)->coord) /*! \brief A sprite is a set of graphics that being an object in animation.