Debian Codegraph @

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

raw
1 % \iffalse
2 % --------------------------------------------------------------------
3 %<*natoapp6c>
4 % \fi
5 %
6 % First, the generic bounding box symbol for all markers.
7 %
8 % \begin{NatoAppFrame}{natoapp6c base}
9 %
10 % Place-holder symbol. This shape will form the basis of many of
11 % the other frame shapes. We define the relevant sizes and
12 % anchors.
13 %
14 % \begin{macrocode}
15 \pgfdeclareshape{natoapp6c base}{%
16 \saveddimen\radius{\pgf@x=\n@to@pp@r}
17 \saveddimen\liney{\pgf@x=.2cm}
18 \saveddimen\linex{\pgf@x=0.41cm}
19 \savedanchor\center{\pgf@x=0cm\pgf@y=0cm}
20 \savedanchor\upper{\pgf@x=0cm\pgf@y=0.35cm}
21 \anchor{north east}{\pgf@x=\radius\pgf@y=\radius}
22 \anchor{south west}{\pgf@x=-\radius\pgf@y=-\radius}
23 \anchor{north west}{\pgf@x=-\radius\pgf@y=\radius}
24 \anchor{south east}{\pgf@x=\radius\pgf@y=-\radius}
25 \anchor{south}{\pgf@x=0cm\pgf@y=-\radius}
26 \anchor{north}{\pgf@x=0cm\pgf@y=\radius}
27 \anchor{west}{\pgf@x=-\radius\pgf@y=0cm}
28 \anchor{east}{\pgf@x=\radius\pgf@y=0cm}
29 \anchor{center}{\center}
30 \anchor{upper}{\upper}
31 \anchor{lower}{\upper\pgf@y=-\pgf@y}
32 \anchor{left}{\upper\pgf@x=-\pgf@y\pgf@y=0cm}
33 \anchor{right}{\upper\pgf@x=\pgf@y\pgf@y=0cm}
34 \savedmacro\init{
35 \def\octagon{%
36 \pgfpathmoveto{\pgfqpointpolar{0} {\radius}}%
37 \pgfpathlineto{\pgfqpointpolar{45} {\radius}}%
38 \pgfpathlineto{\pgfqpointpolar{90} {\radius}}%
39 \pgfpathlineto{\pgfqpointpolar{135}{\radius}}%
40 \pgfpathlineto{\pgfqpointpolar{180}{\radius}}%
41 \pgfpathlineto{\pgfqpointpolar{225}{\radius}}%
42 \pgfpathlineto{\pgfqpointpolar{270}{\radius}}%
43 \pgfpathlineto{\pgfqpointpolar{315}{\radius}}%
44 \pgfpathclose}
45 \def\topline{%
46 \pgfpathmoveto{\pgfqpoint{\linex}{\liney}}%
47 \pgfpathlineto{\pgfqpoint{-\linex}{\liney}}}
48 \def\bottomline{%
49 \pgfpathmoveto{\pgfqpoint{\linex}{-\liney}}%
50 \pgfpathlineto{\pgfqpoint{-\linex}{-\liney}}}
51 }
52 \backgroundpath{%
53 \init%
54 \octagon}
55 \behindforegroundpath{%
56 \init%
57 \octagon%
58 \pgfusepath{stroke}%
59 \topline%
60 \pgfusepath{stroke}%
61 \bottomline%
62 \pgfusepath{stroke}%
63 }
64 }
65 % \end{macrocode}
66 % \end{NatoAppFrame}
67 % \iffalse
68 %</natoapp6c>
69 % --------------------------------------------------------------------
70 % \fi