Mercurial > MadButterfly
annotate tools/mb_c_header.m4 @ 83:ea758bb3bbe2
example
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 22 Aug 2008 00:12:04 +0800 |
parents | 13fdf205047b |
children | 42698de1f653 |
rev | line source |
---|---|
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 changequote(`[', `]')dnl |
63 | 2 divert([-1]) |
3 | |
4 define([ADD_LINEAR_PAINT],[[ | |
5 paint_t *$1; | |
6 ]]) | |
7 | |
8 define([ADD_RADIAL_PAINT],[[ | |
9 paint_t *$1; | |
10 ]]) | |
11 define([ADD_PATH],[ | |
12 [ shape_t *$1; | |
13 ]]) | |
14 define([ADD_RECT],[ | |
15 [ shape_t *$1; | |
16 ]]) | |
17 define([ADD_COORD],[ | |
18 [ coord_t *$1; | |
19 ]]) | |
83 | 20 define([ADD_TEXT],[ |
21 [ shape_t *$1; | |
22 ]]) | |
63 | 23 define([COLOR_STOP],[ ]) |
24 | |
78 | 25 define([REF_STOPS_RADIAL],) |
26 define([REF_STOPS_LINEAR],) | |
64 | 27 define([FILL_SHAPE],[[ |
28 paint_t *$1_fill; | |
29 ]]) | |
30 define([STROKE_SHAPE],[[ | |
31 paint_t *$1_stroke; | |
32 ]]) | |
63 | 33 define([FILL_SHAPE_WITH_PAINT],) |
34 define([STROKE_SHAPE_WITH_PAINT],) | |
80
e548221c04eb
svg2code.py support stroke
Thinker K.F. Li <thinker@branda.to>
parents:
78
diff
changeset
|
35 define([STROKE_WIDTH],) |
81 | 36 define([GROUP_HIDE],) |
37 define([PATH_HIDE],) | |
38 define([RECT_HIDE],) | |
63 | 39 |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
40 define([MADBUTTERFLY],[dnl |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
41 [#ifndef __$1_H_ |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
42 #define __$1_H_ |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
43 |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
44 typedef struct $1 $1_t; |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
45 |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
46 struct $1 { |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
47 coord_t *root_coord;] |
63 | 48 $2[]dnl |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
49 [}; |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
50 |
69
a6150b4e0667
Fix bug of newing linear & radial paints
Thinker K.F. Li <thinker@branda.to>
parents:
67
diff
changeset
|
51 extern $1_t *$1_new(redraw_man_t *rdman); |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
52 extern void $1_free($1_t *obj); |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
53 |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
54 #endif /* __$1_H_ */] |
63 | 55 ]) |
56 divert[]dnl |