Mercurial > MadButterfly
comparison tools/mb_c_source.m4 @ 81:13fdf205047b
Hide shapes and groups
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 21 Aug 2008 13:52:23 +0800 |
parents | e548221c04eb |
children | ea758bb3bbe2 |
comparison
equal
deleted
inserted
replaced
80:e548221c04eb | 81:13fdf205047b |
---|---|
40 define([FILL_SHAPE]) | 40 define([FILL_SHAPE]) |
41 define([STROKE_SHAPE]) | 41 define([STROKE_SHAPE]) |
42 define([FILL_SHAPE_WITH_PAINT]) | 42 define([FILL_SHAPE_WITH_PAINT]) |
43 define([STROKE_SHAPE_WITH_PAINT]) | 43 define([STROKE_SHAPE_WITH_PAINT]) |
44 define([STROKE_WIDTH]) | 44 define([STROKE_WIDTH]) |
45 define([GROUP_HIDE],) | |
46 define([RECT_HIDE],) | |
47 define([PATH_HIDE],) | |
45 divert[]]) | 48 divert[]]) |
46 | 49 |
47 define([S_ADD_LINEAR_PAINT],[ | 50 define([S_ADD_LINEAR_PAINT],[ |
48 obj->$1 = paint_linear_new(rdman, $2, $3, $4, $5); | 51 obj->$1 = paint_linear_new(rdman, $2, $3, $4, $5); |
49 ifelse(COUNT($6),0,,[dnl | 52 ifelse(COUNT($6),0,,[dnl |
108 rdman_paint_stroke(rdman, obj->$1_stroke, obj->$1); | 111 rdman_paint_stroke(rdman, obj->$1_stroke, obj->$1); |
109 ]]) | 112 ]]) |
110 | 113 |
111 define([S_STROKE_WIDTH],[dnl | 114 define([S_STROKE_WIDTH],[dnl |
112 [ obj->$1->stroke_width = $2; | 115 [ obj->$1->stroke_width = $2; |
116 ]]) | |
117 | |
118 define([S_GROUP_HIDE],[dnl | |
119 [ coord_hide(obj->$1); | |
120 ]]) | |
121 | |
122 define([S_RECT_HIDE],[dnl | |
123 [ sh_hide(obj->$1); | |
124 ]]) | |
125 | |
126 define([S_PATH_HIDE],[dnl | |
127 [ sh_hide(obj->$1); | |
113 ]]) | 128 ]]) |
114 | 129 |
115 define([SETUP_VARS],[divert([-1]) | 130 define([SETUP_VARS],[divert([-1]) |
116 define([SIMPORT],[IMPORT(]QUOTE($[]1)[,[S_])]) | 131 define([SIMPORT],[IMPORT(]QUOTE($[]1)[,[S_])]) |
117 SIMPORT([ADD_LINEAR_PAINT]) | 132 SIMPORT([ADD_LINEAR_PAINT]) |
124 SIMPORT([ADD_COORD]) | 139 SIMPORT([ADD_COORD]) |
125 SIMPORT([FILL_SHAPE]) | 140 SIMPORT([FILL_SHAPE]) |
126 SIMPORT([STROKE_SHAPE]) | 141 SIMPORT([STROKE_SHAPE]) |
127 SIMPORT([FILL_SHAPE_WITH_PAINT]) | 142 SIMPORT([FILL_SHAPE_WITH_PAINT]) |
128 SIMPORT([STROKE_SHAPE_WITH_PAINT]) | 143 SIMPORT([STROKE_SHAPE_WITH_PAINT]) |
129 SIMPORT([STROKE_WIDTH],) | 144 SIMPORT([STROKE_WIDTH]) |
145 SIMPORT([GROUP_HIDE]) | |
146 SIMPORT([RECT_HIDE]) | |
147 SIMPORT([PATH_HIDE]) | |
130 divert[]]) | 148 divert[]]) |
131 | 149 |
132 define([F_ADD_LINEAR_PAINT],[[ | 150 define([F_ADD_LINEAR_PAINT],[[ |
133 stops = paint_linear_stops(obj->$1, 0, NULL); | 151 stops = paint_linear_stops(obj->$1, 0, NULL); |
134 free(stops); | 152 free(stops); |
170 FIMPORT([FILL_SHAPE]) | 188 FIMPORT([FILL_SHAPE]) |
171 FIMPORT([STROKE_SHAPE]) | 189 FIMPORT([STROKE_SHAPE]) |
172 define([FILL_SHAPE_WITH_PAINT]) | 190 define([FILL_SHAPE_WITH_PAINT]) |
173 define([STROKE_SHAPE_WITH_PAINT]) | 191 define([STROKE_SHAPE_WITH_PAINT]) |
174 define([STROKE_WIDTH]) | 192 define([STROKE_WIDTH]) |
193 define([GROUP_HIDE],) | |
194 define([RECT_HIDE],) | |
195 define([PATH_HIDE],) | |
175 divert[]]) | 196 divert[]]) |
176 | 197 |
177 define([MADBUTTERFLY],[dnl | 198 define([MADBUTTERFLY],[dnl |
178 [#include <stdio.h> | 199 [#include <stdio.h> |
179 #include <stdlib.h> | 200 #include <stdlib.h> |