comparison src/mb_types.h @ 5:9c331ec9e210

SVG path is partially supported
author Thinker K.F. Li <thinker@branda.to>
date Sat, 26 Jul 2008 01:37:35 +0800
parents
children 7cfecdce94cc
comparison
equal deleted inserted replaced
4:399517bf65dc 5:9c331ec9e210
1 #ifndef __MB_TYPES_H_
2 #define __MB_TYPES_H_
3
4 typedef float co_aix;
5
6 /*! \brief A coordination system.
7 *
8 * It have a transform function defined by matrix to transform
9 * coordination from source space to target space.
10 * Source space is where the contained is drawed, and target space
11 * is where the coordination of parent container of the element
12 * represented by this coord object.
13 */
14 typedef struct _coord {
15 int seq;
16 co_aix matrix[6];
17 co_aix aggr_matrix[6];
18 struct _coord *parent;
19 struct _coord *children, *sibling;
20 } coord_t;
21
22
23 typedef struct _geo geo_t;
24 typedef struct _shape {
25 int sh_type;
26 geo_t *geo;
27 } shape_t;
28
29 enum { SHT_UNKNOW, SHT_PATH, SHT_TEXT };
30
31 extern void coord_init(coord_t *co, coord_t *parent);
32 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y);
33
34 #endif /* __MB_TYPES_H_ */