Mercurial > MadButterfly
comparison include/mb_types.h @ 393:27774b93521e
Add sh_stext_t to implement a simple version of text shape.
- It is still under construction.
- It is supposed to be a simple, less dependency implementation.
- It is more less functional than sh_text_t.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 08 Jun 2009 07:04:20 +0800 |
parents | 3e84458968ec |
children | 16116d84bc5e |
comparison
equal
deleted
inserted
replaced
392:ebf83a50e1e1 | 393:27774b93521e |
---|---|
46 MBO_COORD, | 46 MBO_COORD, |
47 MBO_SHAPES=0x1000, /*! \note Don't touch this. */ | 47 MBO_SHAPES=0x1000, /*! \note Don't touch this. */ |
48 MBO_PATH, | 48 MBO_PATH, |
49 MBO_TEXT, | 49 MBO_TEXT, |
50 MBO_RECT, | 50 MBO_RECT, |
51 MBO_IMAGE | 51 MBO_IMAGE, |
52 MBO_STEXT | |
52 }; | 53 }; |
53 #define MBO_CLASS_MASK 0xf000 | 54 #define MBO_CLASS_MASK 0xf000 |
54 #define MBO_CLASS(x) (((mb_obj_t *)(x))->obj_type & MBO_CLASS_MASK) | 55 #define MBO_CLASS(x) (((mb_obj_t *)(x))->obj_type & MBO_CLASS_MASK) |
55 /*! \brief Return type of a MadBufferly object. */ | 56 /*! \brief Return type of a MadBufferly object. */ |
56 #define MBO_TYPE(x) (((mb_obj_t *)(x))->obj_type) | 57 #define MBO_TYPE(x) (((mb_obj_t *)(x))->obj_type) |
372 #define sh_set_flags(sh, mask) geo_set_flags(sh_get_geo(sh), mask) | 373 #define sh_set_flags(sh, mask) geo_set_flags(sh_get_geo(sh), mask) |
373 #define sh_clear_flags(sh, mask) geo_clear_flags(sh_get_geo(sh), mask) | 374 #define sh_clear_flags(sh, mask) geo_clear_flags(sh_get_geo(sh), mask) |
374 #define sh_pos_is_in(sh, x, y) geo_pos_is_in(sh_get_geo(sh), x, y) | 375 #define sh_pos_is_in(sh, x, y) geo_pos_is_in(sh_get_geo(sh), x, y) |
375 #define sh_get_area(sh) geo_get_area(sh_get_geo(sh)) | 376 #define sh_get_area(sh) geo_get_area(sh_get_geo(sh)) |
376 #define sh_get_coord(sh) ((sh)->coord) | 377 #define sh_get_coord(sh) ((sh)->coord) |
378 #define sh_get_aggr_matrix(sh) (coord_get_aggr_matrix(sh_get_coord(sh))) | |
377 #define sh_get_fill(sh) ((sh)->fill) | 379 #define sh_get_fill(sh) ((sh)->fill) |
378 #define sh_get_stroke(sh) ((sh)->stroke) | 380 #define sh_get_stroke(sh) ((sh)->stroke) |
379 | 381 |
380 | 382 |
381 /*! \brief A sprite is a set of graphics that being an object in animation. | 383 /*! \brief A sprite is a set of graphics that being an object in animation. |