Debian Codegraph @

texmf-dist/source/latex/wargame/natoapp6c/frames/neutral.dtx

raw
1 % \iffalse
2 % --------------------------------------------------------------------
3 %<*natoapp6c>
4 % \fi
5 % \subsubsection{`Neutral' node shapes}
6 %
7 %
8 % Macro for neutral shapes
9 %
10 % \begin{macrocode}
11 \def\n@to@pp@neutr@l@init{%
12 \northeast\wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
13 \def\n@to@pp@neutr@l@left {\pgflineto{\pgfqpoint{-\wg@tmpa}{-\wg@tmpb}}}%
14 \def\n@to@pp@neutr@l@right {\pgflineto{\pgfqpoint{ \wg@tmpa}{ \wg@tmpb}}}%
15 \def\n@to@pp@neutr@l@top {\pgflineto{\pgfqpoint{-\wg@tmpa}{ \wg@tmpb}}}%
16 \def\n@to@pp@neutr@l@bottom{\pgflineto{\pgfqpoint{ \wg@tmpa}{-\wg@tmpb}}}%
17 \def\n@to@pp@neutr@l@nw {\pgfmoveto{\pgfqpoint{-\wg@tmpa}{ \wg@tmpb}}}%
18 \def\n@to@pp@neutr@l@ne {\pgfmoveto{\pgfqpoint{ \wg@tmpa}{ \wg@tmpb}}}%
19 \def\n@to@pp@neutr@l@se {\pgfmoveto{\pgfqpoint{ \wg@tmpa}{-\wg@tmpb}}}%
20 \def\n@to@pp@neutr@l@sw {\pgfmoveto{\pgfqpoint{-\wg@tmpa}{-\wg@tmpb}}}%
21 }
22 % \end{macrocode}
23 %
24 % \iffalse
25 % ....................................................................
26 % \fi
27 % \begin{NatoAppFrame}{natoapp6c neutral air}
28 %
29 % The neutral air command
30 %
31 % \begin{macrocode}
32 \pgfdeclareshape{natoapp6c neutral air}{%
33 \inheritsavedanchors[from=natoapp6c base]
34 \savedanchor\northeast{\pgf@x=\n@to@pp@r\pgf@y=\n@to@pp@r}
35 \anchor{north east}{\northeast}
36 \anchor{north west}{\northeast\pgf@x=-\pgf@x}
37 \anchor{south east}{\northeast\pgf@y=-\pgf@y}
38 \anchor{south west}{\northeast\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
39 \anchor{north}{\northeast\pgf@x=0cm}
40 \anchor{east}{\northeast\pgf@y=0cm}
41 \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0cm}
42 \anchor{south}{\northeast\pgf@x=0cm\pgf@y=-\pgf@y}
43 \inheritanchor[from=natoapp6c base]{upper}
44 \inheritanchor[from=natoapp6c base]{lower}
45 \inheritanchor[from=natoapp6c base]{left}
46 \inheritanchor[from=natoapp6c base]{right}
47 \inheritanchor[from=natoapp6c base]{center}
48 \backgroundpath{%
49 \n@to@pp@neutr@l@init%
50 \n@to@pp@neutr@l@se
51 \n@to@pp@neutr@l@right%
52 \n@to@pp@neutr@l@top%
53 \n@to@pp@neutr@l@left%
54 }
55 \behindforegroundpath{%
56 \n@to@pp@neutr@l@init%
57 \n@to@pp@neutr@l@se
58 \n@to@pp@neutr@l@right%
59 \n@to@pp@neutr@l@top%
60 \n@to@pp@neutr@l@left%
61 \pgfusepath{stroke}%
62 }
63 }
64 % \end{macrocode}
65 % \end{NatoAppFrame}
66 %
67 % \iffalse
68 % ....................................................................
69 % \fi
70 % \begin{NatoAppFrame}{natoapp6c neutral land}
71 %
72 % The neutral land command
73 %
74 % \begin{macrocode}
75 \pgfdeclareshape{natoapp6c neutral land}{%
76 \inheritsavedanchors[from=natoapp6c neutral air]
77 \inheritanchor[from=natoapp6c neutral air]{north east}
78 \inheritanchor[from=natoapp6c neutral air]{north west}
79 \inheritanchor[from=natoapp6c neutral air]{south east}
80 \inheritanchor[from=natoapp6c neutral air]{south west}
81 \inheritanchor[from=natoapp6c neutral air]{north}
82 \inheritanchor[from=natoapp6c neutral air]{west}
83 \inheritanchor[from=natoapp6c neutral air]{east}
84 \inheritanchor[from=natoapp6c neutral air]{south}
85 \inheritanchor[from=natoapp6c neutral air]{upper}
86 \inheritanchor[from=natoapp6c neutral air]{lower}
87 \inheritanchor[from=natoapp6c neutral air]{left}
88 \inheritanchor[from=natoapp6c neutral air]{right}
89 \inheritanchor[from=natoapp6c neutral air]{center}
90 \backgroundpath{%
91 \n@to@pp@neutr@l@init%
92 \n@to@pp@neutr@l@ne
93 \n@to@pp@neutr@l@top%
94 \n@to@pp@neutr@l@left%
95 \n@to@pp@neutr@l@bottom%
96 \pgfclosepath
97 }
98 \behindforegroundpath{%
99 \n@to@pp@neutr@l@init%
100 \n@to@pp@neutr@l@ne
101 \n@to@pp@neutr@l@top%
102 \n@to@pp@neutr@l@left%
103 \n@to@pp@neutr@l@bottom%
104 \pgfclosepath
105 \pgfusepath{stroke}%
106 }
107 }
108 % \end{macrocode}
109 % \end{NatoAppFrame}
110 %
111 % \iffalse
112 % ....................................................................
113 % \fi
114 % \begin{NatoAppFrame}{natoapp6c neutral activity}
115 %
116 % The neutral activity command. Similar to land command but with
117 % boxes added in the corners.
118 %
119 % \begin{macrocode}
120 \pgfdeclareshape{natoapp6c neutral activity}{%
121 \inheritsavedanchors[from=natoapp6c neutral land]
122 \inheritanchor[from=natoapp6c neutral land]{center}
123 \inheritanchor[from=natoapp6c neutral land]{inner north east}
124 \inheritanchor[from=natoapp6c neutral land]{inner north west}
125 \inheritanchor[from=natoapp6c neutral land]{inner south west}
126 \inheritanchor[from=natoapp6c neutral land]{inner south east}
127 \inheritanchor[from=natoapp6c neutral land]{north east}
128 \inheritanchor[from=natoapp6c neutral land]{north west}
129 \inheritanchor[from=natoapp6c neutral land]{south east}
130 \inheritanchor[from=natoapp6c neutral land]{south west}
131 \inheritanchor[from=natoapp6c neutral land]{north}
132 \inheritanchor[from=natoapp6c neutral land]{west}
133 \inheritanchor[from=natoapp6c neutral land]{east}
134 \inheritanchor[from=natoapp6c neutral land]{south}
135 \inheritanchor[from=natoapp6c neutral land]{upper}
136 \inheritanchor[from=natoapp6c neutral land]{lower}
137 \inheritanchor[from=natoapp6c neutral land]{left}
138 \inheritanchor[from=natoapp6c neutral land]{right}
139 \inheritanchor[from=natoapp6c neutral land]{center}
140 \inheritbackgroundpath[from=natoapp6c neutral land]
141 \behindforegroundpath{
142 \begin{n@to@pp@stroketofill}
143 \n@to@pp@neutr@l@init%
144 \n@to@pp@neutr@l@ne
145 \n@to@pp@neutr@l@top%
146 \n@to@pp@neutr@l@left%
147 \n@to@pp@neutr@l@bottom%
148 \pgfclosepath
149 \pgfusepath{stroke}
150 %
151 \northeast \wg@tmpa=\pgf@x\wg@tmpb\pgf@y%
152 \wg@tmpc=\wg@tmpa\advance\wg@tmpc-\n@to@pp@act@w
153 \wg@tmpd=\wg@tmpb\advance\wg@tmpd-\n@to@pp@act@w
154 %
155 \pgfpathmoveto{\pgfqpoint{\wg@tmpa}{\wg@tmpb}}%
156 \pgfpathlineto{\pgfqpoint{\wg@tmpc}{\wg@tmpb}}%
157 \pgfpathlineto{\pgfqpoint{\wg@tmpc}{\wg@tmpd}}%
158 \pgfpathlineto{\pgfqpoint{\wg@tmpa}{\wg@tmpd}}%
159 \pgfclosepath
160 \pgfusepath{fill}%
161 %
162 \pgfpathmoveto{\pgfqpoint{\wg@tmpa}{-\wg@tmpd}}%
163 \pgfpathlineto{\pgfqpoint{\wg@tmpc}{-\wg@tmpd}}%
164 \pgfpathlineto{\pgfqpoint{\wg@tmpc}{-\wg@tmpb}}%
165 \pgfpathlineto{\pgfqpoint{\wg@tmpa}{-\wg@tmpb}}%
166 \pgfclosepath
167 \pgfusepath{fill}%
168 %
169 \pgfpathmoveto{\pgfqpoint{-\wg@tmpc}{\wg@tmpb}}%
170 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpb}}%
171 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpd}}%
172 \pgfpathlineto{\pgfqpoint{-\wg@tmpc}{\wg@tmpd}}%
173 \pgfclosepath
174 \pgfusepath{fill}%
175 %
176 \pgfpathmoveto{\pgfqpoint{-\wg@tmpc}{-\wg@tmpd}}%
177 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{-\wg@tmpd}}%
178 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{-\wg@tmpb}}%
179 \pgfpathlineto{\pgfqpoint{-\wg@tmpc}{-\wg@tmpb}}%
180 \pgfclosepath
181 \pgfusepath{fill}%
182 \end{n@to@pp@stroketofill}
183 }
184 }
185 % \end{macrocode}
186 % \end{NatoAppFrame}
187 %
188 % \iffalse
189 % ....................................................................
190 % \fi
191 % \begin{NatoAppFrame}{natoapp6c neutral equipment}
192 %
193 % The neutral equipment command. Same as land command
194 %
195 % \begin{macrocode}
196 \pgfdeclareshape{natoapp6c neutral equipment}{%
197 \inheritsavedanchors[from=natoapp6c neutral land]
198 \inheritanchor[from=natoapp6c neutral land]{center}
199 \inheritanchor[from=natoapp6c neutral land]{inner north east}
200 \inheritanchor[from=natoapp6c neutral land]{inner north west}
201 \inheritanchor[from=natoapp6c neutral land]{inner south west}
202 \inheritanchor[from=natoapp6c neutral land]{inner south east}
203 \inheritanchor[from=natoapp6c neutral land]{north east}
204 \inheritanchor[from=natoapp6c neutral land]{north west}
205 \inheritanchor[from=natoapp6c neutral land]{south east}
206 \inheritanchor[from=natoapp6c neutral land]{south west}
207 \inheritanchor[from=natoapp6c neutral land]{north}
208 \inheritanchor[from=natoapp6c neutral land]{west}
209 \inheritanchor[from=natoapp6c neutral land]{east}
210 \inheritanchor[from=natoapp6c neutral land]{south}
211 \inheritanchor[from=natoapp6c neutral land]{upper}
212 \inheritanchor[from=natoapp6c neutral land]{lower}
213 \inheritanchor[from=natoapp6c neutral land]{left}
214 \inheritanchor[from=natoapp6c neutral land]{right}
215 \inheritanchor[from=natoapp6c neutral land]{center}
216 \inheritbackgroundpath[from=natoapp6c neutral land]
217 \inheritbehindbackgroundpath[from=natoapp6c neutral land]
218 }
219 % \end{macrocode}
220 % \end{NatoAppFrame}
221 %
222 % \iffalse
223 % ....................................................................
224 % \fi
225 % \begin{NatoAppFrame}{natoapp6c neutral installation}
226 %
227 % The neutral installation command. Similar to land command but
228 % with a `hat' on top.
229 %
230 % \begin{macrocode}
231 \pgfdeclareshape{natoapp6c neutral installation}{%
232 \inheritsavedanchors[from=natoapp6c neutral land]
233 \inheritanchor[from=natoapp6c neutral land]{center}
234 \inheritanchor[from=natoapp6c neutral land]{inner north east}
235 \inheritanchor[from=natoapp6c neutral land]{inner north west}
236 \inheritanchor[from=natoapp6c neutral land]{inner south west}
237 \inheritanchor[from=natoapp6c neutral land]{inner south east}
238 \inheritanchor[from=natoapp6c neutral land]{north east}
239 \inheritanchor[from=natoapp6c neutral land]{north west}
240 \inheritanchor[from=natoapp6c neutral land]{south east}
241 \inheritanchor[from=natoapp6c neutral land]{south west}
242 \inheritanchor[from=natoapp6c neutral land]{north}
243 \inheritanchor[from=natoapp6c neutral land]{west}
244 \inheritanchor[from=natoapp6c neutral land]{east}
245 \inheritanchor[from=natoapp6c neutral land]{south}
246 \inheritanchor[from=natoapp6c neutral land]{upper}
247 \inheritanchor[from=natoapp6c neutral land]{lower}
248 \inheritanchor[from=natoapp6c neutral land]{left}
249 \inheritanchor[from=natoapp6c neutral land]{right}
250 \inheritanchor[from=natoapp6c neutral land]{center}
251 \inheritbackgroundpath[from=natoapp6c neutral land]
252 \behindforegroundpath{
253 \begin{n@to@pp@stroketofill}
254 \n@to@pp@neutr@l@init%
255 \n@to@pp@neutr@l@ne
256 \n@to@pp@neutr@l@top%
257 \n@to@pp@neutr@l@left%
258 \n@to@pp@neutr@l@bottom%
259 \pgfclosepath
260 \pgfusepath{stroke}
261 %
262 \northeast \wg@tmpa=\pgf@y%
263 \wg@tmpb=\wg@tmpa\advance\wg@tmpb\n@to@pp@inst@h%
264 %
265 \pgfpathmoveto{\pgfqpoint{ \n@to@pp@inst@x}{\wg@tmpb}}%
266 \pgfpathlineto{\pgfqpoint{-\n@to@pp@inst@x}{\wg@tmpb}}%
267 \pgfpathlineto{\pgfqpoint{-\n@to@pp@inst@x}{\wg@tmpa}}%
268 \pgfpathlineto{\pgfqpoint{ \n@to@pp@inst@x}{\wg@tmpa}}%
269 \pgfclosepath
270 \pgfusepath{fill}%
271 \end{n@to@pp@stroketofill}
272 }
273 }
274 % \end{macrocode}
275 % \end{NatoAppFrame}
276 %
277 % \iffalse
278 % ....................................................................
279 % \fi
280 % \begin{NatoAppFrame}{natoapp6c neutral sea surface}
281 %
282 % The neutral sea surface command. Same as land command.
283 %
284 % \begin{macrocode}
285 \pgfdeclareshape{natoapp6c neutral sea surface}{%
286 \inheritsavedanchors[from=natoapp6c neutral equipment]
287 \inheritanchor[from=natoapp6c neutral equipment]{inner north east}
288 \inheritanchor[from=natoapp6c neutral equipment]{inner north west}
289 \inheritanchor[from=natoapp6c neutral equipment]{inner south west}
290 \inheritanchor[from=natoapp6c neutral equipment]{inner south east}
291 \inheritanchor[from=natoapp6c neutral equipment]{north east}
292 \inheritanchor[from=natoapp6c neutral equipment]{north west}
293 \inheritanchor[from=natoapp6c neutral equipment]{south east}
294 \inheritanchor[from=natoapp6c neutral equipment]{south west}
295 \inheritanchor[from=natoapp6c neutral equipment]{north}
296 \inheritanchor[from=natoapp6c neutral equipment]{west}
297 \inheritanchor[from=natoapp6c neutral equipment]{east}
298 \inheritanchor[from=natoapp6c neutral equipment]{south}
299 \inheritanchor[from=natoapp6c neutral equipment]{upper}
300 \inheritanchor[from=natoapp6c neutral equipment]{lower}
301 \inheritanchor[from=natoapp6c neutral equipment]{left}
302 \inheritanchor[from=natoapp6c neutral equipment]{right}
303 \inheritanchor[from=natoapp6c neutral equipment]{center}
304 \inheritbackgroundpath[from=natoapp6c neutral equipment]
305 \inheritbehindforegroundpath[from=natoapp6c neutral equipment]
306 }
307 % \end{macrocode}
308 % \end{NatoAppFrame}
309 %
310 % \iffalse
311 % ....................................................................
312 % \fi
313 % \begin{NatoAppFrame}{natoapp6c neutral space}
314 %
315 % The neutral space command. Similar to air command but with a
316 % bar.
317 %
318 % \begin{macrocode}
319 \pgfdeclareshape{natoapp6c neutral space}{%
320 \inheritsavedanchors[from=natoapp6c neutral air]
321 \inheritanchor[from=natoapp6c neutral air]{north east}
322 \inheritanchor[from=natoapp6c neutral air]{north west}
323 \inheritanchor[from=natoapp6c neutral air]{south east}
324 \inheritanchor[from=natoapp6c neutral air]{south west}
325 \inheritanchor[from=natoapp6c neutral air]{north}
326 \inheritanchor[from=natoapp6c neutral air]{west}
327 \inheritanchor[from=natoapp6c neutral air]{east}
328 \inheritanchor[from=natoapp6c neutral air]{south}
329 \inheritanchor[from=natoapp6c neutral air]{upper}
330 \inheritanchor[from=natoapp6c neutral air]{lower}
331 \inheritanchor[from=natoapp6c neutral air]{left}
332 \inheritanchor[from=natoapp6c neutral air]{right}
333 \inheritanchor[from=natoapp6c neutral air]{center}
334 \inheritbackgroundpath[from=natoapp6c neutral air]
335 \behindforegroundpath{%
336 \begin{n@to@pp@stroketofill}
337 \n@to@pp@neutr@l@init%
338 \n@to@pp@neutr@l@se
339 \n@to@pp@neutr@l@right%
340 \n@to@pp@neutr@l@top%
341 \n@to@pp@neutr@l@left%
342 \pgfusepath{stroke}%
343 %
344 \n@to@pp@neutr@l@ne
345 \n@to@pp@neutr@l@top%
346 \northeast\wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
347 \advance\wg@tmpb-\n@to@pp@space@h
348 %
349 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpc}}%
350 \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpb}}%
351 \pgfpathlineto{\pgfqpoint{ \wg@tmpa}{\wg@tmpb}}%
352 \pgfclosepath%
353 \pgfusepath{fill}%
354 \end{n@to@pp@stroketofill}
355 }
356 }
357 % \end{macrocode}
358 % \end{NatoAppFrame}
359 %
360 % \iffalse
361 % ....................................................................
362 % \fi
363 % \begin{NatoAppFrame}{natoapp6c neutral sub surface}
364 %
365 % The neutral sub surface command
366 %
367 % \begin{macrocode}
368 \pgfdeclareshape{natoapp6c neutral sub surface}{%
369 \inheritsavedanchors[from=natoapp6c neutral air]
370 \inheritanchor[from=natoapp6c neutral air]{north east}
371 \inheritanchor[from=natoapp6c neutral air]{north west}
372 \inheritanchor[from=natoapp6c neutral air]{south east}
373 \inheritanchor[from=natoapp6c neutral air]{south west}
374 \inheritanchor[from=natoapp6c neutral air]{north}
375 \inheritanchor[from=natoapp6c neutral air]{west}
376 \inheritanchor[from=natoapp6c neutral air]{east}
377 \inheritanchor[from=natoapp6c neutral air]{south}
378 \inheritanchor[from=natoapp6c neutral air]{upper}
379 \inheritanchor[from=natoapp6c neutral air]{lower}
380 \inheritanchor[from=natoapp6c neutral air]{left}
381 \inheritanchor[from=natoapp6c neutral air]{right}
382 \inheritanchor[from=natoapp6c neutral air]{center}
383 \backgroundpath{%
384 \n@to@pp@neutr@l@init%
385 \n@to@pp@neutr@l@nw
386 \n@to@pp@neutr@l@left%
387 \n@to@pp@neutr@l@bottom%
388 \n@to@pp@neutr@l@right%
389 }
390 \behindforegroundpath{%
391 \n@to@pp@neutr@l@init%
392 \n@to@pp@neutr@l@nw
393 \n@to@pp@neutr@l@left%
394 \n@to@pp@neutr@l@bottom%
395 \n@to@pp@neutr@l@right%
396 \pgfusepath{stroke}%
397 }
398 }
399 % \end{macrocode}
400 % \end{NatoAppFrame}
401 %
402 % \iffalse
403 % ....................................................................
404 % \fi
405 % \begin{NatoAppFrame}{natoapp6c neutral dismounted}
406 %
407 % The neutral dismounted command. Same as land command
408 %
409 % \begin{macrocode}
410 \pgfdeclareshape{natoapp6c neutral dismounted}{%
411 \inheritsavedanchors[from=natoapp6c neutral land]
412 \inheritanchor[from=natoapp6c neutral land]{center}
413 \inheritanchor[from=natoapp6c neutral land]{inner north east}
414 \inheritanchor[from=natoapp6c neutral land]{inner north west}
415 \inheritanchor[from=natoapp6c neutral land]{inner south west}
416 \inheritanchor[from=natoapp6c neutral land]{inner south east}
417 \inheritanchor[from=natoapp6c neutral land]{north east}
418 \inheritanchor[from=natoapp6c neutral land]{north west}
419 \inheritanchor[from=natoapp6c neutral land]{south east}
420 \inheritanchor[from=natoapp6c neutral land]{south west}
421 \inheritanchor[from=natoapp6c neutral land]{north}
422 \inheritanchor[from=natoapp6c neutral land]{west}
423 \inheritanchor[from=natoapp6c neutral land]{east}
424 \inheritanchor[from=natoapp6c neutral land]{south}
425 \inheritanchor[from=natoapp6c neutral land]{upper}
426 \inheritanchor[from=natoapp6c neutral land]{lower}
427 \inheritanchor[from=natoapp6c neutral land]{left}
428 \inheritanchor[from=natoapp6c neutral land]{right}
429 \inheritanchor[from=natoapp6c neutral land]{center}
430 \inheritbackgroundpath[from=natoapp6c neutral land]
431 \inheritbehindbackgroundpath[from=natoapp6c neutral land]
432 }
433 % \end{macrocode}
434 % \end{NatoAppFrame}
435 %
436 % \iffalse
437 %</natoapp6c>
438 % --------------------------------------------------------------------
439 % \fi