summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx')
-rw-r--r--macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx453
1 files changed, 453 insertions, 0 deletions
diff --git a/macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx b/macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx
new file mode 100644
index 0000000000..c3df3f6525
--- /dev/null
+++ b/macros/latex/contrib/wargame/source/natoapp6c/frames/hostile.dtx
@@ -0,0 +1,453 @@
+% \iffalse
+% --------------------------------------------------------------------
+%<*natoapp6c>
+% \fi
+% \subsubsection{`Hostile' node shapes}
+%
+%
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile air}
+%
+% The hostile air command
+%
+%
+% Macro for hostile air shape
+%
+%
+% \begin{macrocode}
+\def\n@to@hostile@@ir{%
+ \southeast \wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
+ \cntrl \wg@tmpc=\pgf@y%
+ \north \wg@tmpd=\pgf@y%
+ \pgfpathmoveto{\pgfqpoint{-\wg@tmpa}{\wg@tmpb}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpa}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpa}{\wg@tmpb}}%
+}
+% \end{macrocode}
+%
+%
+% The hostile air command.
+%
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile air}{%
+ \inheritsavedanchors[from=natoapp6c base]
+ \savedanchor\southeast{%
+ \pgf@x=\n@to@pp@r%
+ \pgf@y=-\n@to@pp@r}
+ \savedanchor\cntrl{%
+ \pgf@x=\n@to@pp@r%
+ \pgf@y=0.414\n@to@pp@r% (sqrt(2)-1)
+ }
+ \savedanchor\north{\pgf@x=0cm\pgf@y=1.414\n@to@pp@r}
+ \anchor{south east}{\southeast}
+ \anchor{south west}{\southeast\pgf@x=-\pgf@x}
+ \anchor{north east}{\southeast\wg@tmpa=\pgf@x\north\pgf@x=\wg@tmpa}
+ \anchor{north west}{\southeast\wg@tmpa=\pgf@x\north\pgf@x=-\wg@tmpa}
+ \anchor{north}{\north}
+ \anchor{east}{%
+ \north\wg@tmpb\pgf@y%
+ \southeast\wg@tmpc=\pgf@y\wg@tmpa=\pgf@x%
+ \advance\wg@tmpb-\wg@tmpc
+ \divide\wg@tmpb2%
+ \advance\wg@tmpb\wg@tmpc%
+ \pgf@x=\wg@tmpa%
+ \pgf@y=\wg@tmpb}
+ \anchor{west}{%
+ \north\wg@tmpb\pgf@y%
+ \southeast\wg@tmpc=\pgf@y\wg@tmpa=\pgf@x%
+ \advance\wg@tmpb-\wg@tmpc
+ \divide\wg@tmpb2%
+ \advance\wg@tmpb\wg@tmpc%
+ \pgf@x=-\wg@tmpa%
+ \pgf@y=\wg@tmpb}
+ \anchor{south}{\southeast\pgf@x=0cm}
+ \inheritanchor[from=natoapp6c base]{upper}
+ \inheritanchor[from=natoapp6c base]{lower}
+ \inheritanchor[from=natoapp6c base]{left}
+ \inheritanchor[from=natoapp6c base]{right}
+ \inheritanchor[from=natoapp6c base]{center}
+ \backgroundpath{%
+ \n@to@hostile@@ir%
+ }
+ \behindforegroundpath{%
+ \n@to@hostile@@ir%
+ \pgfusepath{stroke}%
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile land}
+%
+% Macro for hostile land command
+%
+% \begin{macrocode}
+\def\n@to@hostile@l@nd{%
+ \northeast \wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
+ \pgfpathmoveto{\pgfqpoint{ \wg@tmpa}{ 0cm}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{ \wg@tmpb}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{ 0cm}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{-\wg@tmpb}}%
+ \pgfclosepath}
+% \end{macrocode}
+%
+% The hostile land command.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile land}{%
+ \inheritsavedanchors[from=natoapp6c base]
+ \savedanchor\northeast{%
+ \pgf@x=1.414\n@to@pp@r%
+ \pgf@y=1.414\n@to@pp@r}
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{south east}{\northeast\pgf@y=-\pgf@y}
+ \anchor{south west}{\northeast\pgf@x=-\pgf@x\pgf@y=-\pgf@y}
+ \anchor{north}{\northeast\pgf@x=0cm}
+ \anchor{south}{\northeast\pgf@x=0cm\pgf@y=-\pgf@y}
+ \anchor{east}{\northeast\pgf@y=0cm}
+ \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0cm}
+ \inheritanchor[from=natoapp6c base]{upper}
+ \inheritanchor[from=natoapp6c base]{lower}
+ \inheritanchor[from=natoapp6c base]{left}
+ \inheritanchor[from=natoapp6c base]{right}
+ \inheritanchor[from=natoapp6c base]{center}
+ \backgroundpath{%
+ \n@to@hostile@l@nd%
+ }
+ \behindforegroundpath{%
+ \n@to@hostile@l@nd%
+ \pgfusepath{stroke}%
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile activity}
+%
+% The hostile activity command. Similar to land command, but with
+% boxes in the corners.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile activity}{%
+ \inheritsavedanchors[from=natoapp6c hostile land]
+ \inheritanchor[from=natoapp6c hostile land]{center}
+ \inheritanchor[from=natoapp6c hostile land]{inner north east}
+ \inheritanchor[from=natoapp6c hostile land]{inner north west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south east}
+ \inheritanchor[from=natoapp6c hostile land]{north east}
+ \inheritanchor[from=natoapp6c hostile land]{north west}
+ \inheritanchor[from=natoapp6c hostile land]{south east}
+ \inheritanchor[from=natoapp6c hostile land]{south west}
+ \inheritanchor[from=natoapp6c hostile land]{north}
+ \inheritanchor[from=natoapp6c hostile land]{west}
+ \inheritanchor[from=natoapp6c hostile land]{east}
+ \inheritanchor[from=natoapp6c hostile land]{south}
+ \inheritanchor[from=natoapp6c hostile land]{upper}
+ \inheritanchor[from=natoapp6c hostile land]{lower}
+ \inheritanchor[from=natoapp6c hostile land]{left}
+ \inheritanchor[from=natoapp6c hostile land]{right}
+ \inheritanchor[from=natoapp6c hostile land]{center}
+ \inheritbackgroundpath[from=natoapp6c hostile land]
+ \behindforegroundpath{
+ \begin{n@to@pp@stroketofill}
+ \n@to@hostile@l@nd%
+ \pgfusepath{stroke}
+ %
+ \northeast \wg@tmpb=\pgf@y%
+ \wg@tmpa=0.707\n@to@pp@act@w
+ \wg@tmpc=\wg@tmpb\advance\wg@tmpc-1.414\n@to@pp@act@w
+ \wg@tmpd=\wg@tmpb\advance\wg@tmpd-\wg@tmpa
+ %
+ \pgfpathmoveto{\pgfqpoint{ \wg@tmpa}{\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{\wg@tmpb}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{\wg@tmpc}}%
+ \pgfclosepath
+ \pgfusepath{fill}%
+ %
+ \pgfpathmoveto{\pgfqpoint{-\wg@tmpc}{0cm}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpd}{\wg@tmpa}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpb}{0cm}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpd}{-\wg@tmpa}}%
+ \pgfclosepath
+ \pgfusepath{fill}%
+ %
+ \pgfpathmoveto{\pgfqpoint{ \wg@tmpa}{-\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{-\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{-\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{-\wg@tmpb}}%
+ \pgfclosepath
+ \pgfusepath{fill}%
+ %
+ \pgfpathmoveto{\pgfqpoint{\wg@tmpb}{0cm}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpd}{\wg@tmpa}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpc}{0cm}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpd}{-\wg@tmpa}}%
+ \pgfclosepath
+ \pgfusepath{fill}%
+ \end{n@to@pp@stroketofill}
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile equipment}
+%
+% The hostile equipment command. Same as land command.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile equipment}{%
+ \inheritsavedanchors[from=natoapp6c hostile land]
+ \inheritanchor[from=natoapp6c hostile land]{inner north east}
+ \inheritanchor[from=natoapp6c hostile land]{inner north west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south east}
+ \inheritanchor[from=natoapp6c hostile land]{north east}
+ \inheritanchor[from=natoapp6c hostile land]{north west}
+ \inheritanchor[from=natoapp6c hostile land]{south east}
+ \inheritanchor[from=natoapp6c hostile land]{south west}
+ \inheritanchor[from=natoapp6c hostile land]{north}
+ \inheritanchor[from=natoapp6c hostile land]{west}
+ \inheritanchor[from=natoapp6c hostile land]{east}
+ \inheritanchor[from=natoapp6c hostile land]{south}
+ \inheritanchor[from=natoapp6c hostile land]{upper}
+ \inheritanchor[from=natoapp6c hostile land]{lower}
+ \inheritanchor[from=natoapp6c hostile land]{left}
+ \inheritanchor[from=natoapp6c hostile land]{right}
+ \inheritanchor[from=natoapp6c hostile land]{center}
+ \inheritbackgroundpath[from=natoapp6c hostile land]
+ \inheritbehindforegroundpath[from=natoapp6c hostile land]
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile installation}
+%
+% The hostile installation command. Similar to land command, but
+% with a `hat' on top.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile installation}{%
+ \inheritsavedanchors[from=natoapp6c hostile land]
+ \inheritanchor[from=natoapp6c hostile land]{center}
+ \inheritanchor[from=natoapp6c hostile land]{inner north east}
+ \inheritanchor[from=natoapp6c hostile land]{inner north west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south west}
+ \inheritanchor[from=natoapp6c hostile land]{inner south east}
+ \inheritanchor[from=natoapp6c hostile land]{north east}
+ \inheritanchor[from=natoapp6c hostile land]{north west}
+ \inheritanchor[from=natoapp6c hostile land]{south east}
+ \inheritanchor[from=natoapp6c hostile land]{south west}
+ \inheritanchor[from=natoapp6c hostile land]{north}
+ \inheritanchor[from=natoapp6c hostile land]{west}
+ \inheritanchor[from=natoapp6c hostile land]{east}
+ \inheritanchor[from=natoapp6c hostile land]{south}
+ \inheritanchor[from=natoapp6c hostile land]{upper}
+ \inheritanchor[from=natoapp6c hostile land]{lower}
+ \inheritanchor[from=natoapp6c hostile land]{left}
+ \inheritanchor[from=natoapp6c hostile land]{right}
+ \inheritanchor[from=natoapp6c hostile land]{center}
+ \inheritbackgroundpath[from=natoapp6c hostile land]
+ \behindforegroundpath{
+ \begin{n@to@pp@stroketofill}
+ \n@to@hostile@l@nd%
+ \pgfusepath{stroke}
+ %
+ \northeast \wg@tmpa=\pgf@x\wg@tmpb\pgf@y%
+ \wg@tmpc=\wg@tmpb
+ \advance\wg@tmpc\n@to@pp@inst@h%
+ \advance\wg@tmpc-0.05cm%
+ %
+ \pgfpathmoveto{\pgfqpoint{ \wg@tmpa}{0cm}}
+ \pgfpathlineto{\pgfqpoint{ \wg@tmpa}{\wg@tmpc}}
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpc}}
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{0cm}}
+ \pgfpathlineto{\pgfqpoint{ 0cm}{\wg@tmpb}}
+ \pgfclosepath%
+ \pgfusepath{clip}
+ %
+ \wg@tmpd=\wg@tmpb%
+ \advance\wg@tmpd-\n@to@pp@inst@h%
+ %
+ \pgfpathmoveto{\pgfqpoint{ \n@to@pp@inst@x}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{-\n@to@pp@inst@x}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{-\n@to@pp@inst@x}{\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{ \n@to@pp@inst@x}{\wg@tmpd}}%
+ \pgfclosepath
+ \pgfusepath{fill}%
+ \end{n@to@pp@stroketofill}
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile sea surface}
+%
+% The hostile sea surface command. Same as land command
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile sea surface}{%
+ \inheritsavedanchors[from=natoapp6c hostile equipment]
+ \inheritanchor[from=natoapp6c hostile equipment]{inner north east}
+ \inheritanchor[from=natoapp6c hostile equipment]{inner north west}
+ \inheritanchor[from=natoapp6c hostile equipment]{inner south west}
+ \inheritanchor[from=natoapp6c hostile equipment]{inner south east}
+ \inheritanchor[from=natoapp6c hostile equipment]{north east}
+ \inheritanchor[from=natoapp6c hostile equipment]{north west}
+ \inheritanchor[from=natoapp6c hostile equipment]{south east}
+ \inheritanchor[from=natoapp6c hostile equipment]{south west}
+ \inheritanchor[from=natoapp6c hostile equipment]{north}
+ \inheritanchor[from=natoapp6c hostile equipment]{west}
+ \inheritanchor[from=natoapp6c hostile equipment]{east}
+ \inheritanchor[from=natoapp6c hostile equipment]{south}
+ \inheritanchor[from=natoapp6c hostile equipment]{upper}
+ \inheritanchor[from=natoapp6c hostile equipment]{lower}
+ \inheritanchor[from=natoapp6c hostile equipment]{left}
+ \inheritanchor[from=natoapp6c hostile equipment]{right}
+ \inheritanchor[from=natoapp6c hostile equipment]{center}
+ \inheritbackgroundpath[from=natoapp6c hostile equipment]
+ \inheritbehindforegroundpath[from=natoapp6c hostile equipment]
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile space}
+%
+% The hostile space command. Similar to air command, but with bar on
+% top.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile space}{%
+ \inheritsavedanchors[from=natoapp6c hostile air]
+ \inheritanchor[from=natoapp6c hostile air]{north east}
+ \inheritanchor[from=natoapp6c hostile air]{north west}
+ \inheritanchor[from=natoapp6c hostile air]{south east}
+ \inheritanchor[from=natoapp6c hostile air]{south west}
+ \inheritanchor[from=natoapp6c hostile air]{north}
+ \inheritanchor[from=natoapp6c hostile air]{west}
+ \inheritanchor[from=natoapp6c hostile air]{east}
+ \inheritanchor[from=natoapp6c hostile air]{south}
+ \inheritanchor[from=natoapp6c hostile air]{upper}
+ \inheritanchor[from=natoapp6c hostile air]{lower}
+ \inheritanchor[from=natoapp6c hostile air]{left}
+ \inheritanchor[from=natoapp6c hostile air]{right}
+ \inheritanchor[from=natoapp6c hostile air]{center}
+ \inheritbackgroundpath[from=natoapp6c hostile air]
+ \behindforegroundpath{%
+ \begin{n@to@pp@stroketofill}
+ \n@to@hostile@@ir%
+ \pgfusepath{stroke,clip}%
+ %
+ \north\wg@tmpa=\pgf@y\wg@tmpb=\pgf@y
+ \advance\wg@tmpb-\n@to@pp@space@h
+ %
+ \pgfpathmoveto{\pgfqpoint{ \n@to@pp@r}{\wg@tmpa}}%
+ \pgfpathlineto{\pgfqpoint{-\n@to@pp@r}{\wg@tmpa}}%
+ \pgfpathlineto{\pgfqpoint{-\n@to@pp@r}{\wg@tmpb}}%
+ \pgfpathlineto{\pgfqpoint{ \n@to@pp@r}{\wg@tmpb}}%
+ \pgfclosepath%
+ \pgfusepath{fill}%
+ \end{n@to@pp@stroketofill}
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+% ....................................................................
+% \fi
+% \begin{NatoAppFrame}{natoapp6c hostile sub surface}
+%
+% Macro for hostile sub surface command
+%
+% \begin{macrocode}
+\def\n@to@hostile@sub{%
+ \northeast \wg@tmpa=\pgf@x\wg@tmpb=\pgf@y%
+ \cntrl \wg@tmpc=\pgf@y%
+ \south \wg@tmpd=\pgf@y%
+ \pgfpathmoveto{\pgfqpoint{-\wg@tmpa}{\wg@tmpb}}%
+ \pgfpathlineto{\pgfqpoint{-\wg@tmpa}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{ 0cm}{\wg@tmpd}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpa}{\wg@tmpc}}%
+ \pgfpathlineto{\pgfqpoint{\wg@tmpa}{\wg@tmpb}}%
+}
+% \end{macrocode}
+%
+% The hostile sub surface command
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c hostile sub surface}{%
+ \inheritsavedanchors[from=natoapp6c base]
+ \savedanchor\northeast{%
+ \pgf@x=\n@to@pp@r%
+ \pgf@y=\n@to@pp@r}
+ \savedanchor\cntrl{\pgf@x=\n@to@pp@r\pgf@y=-0.414\n@to@pp@r}
+ \savedanchor\south{\pgf@x=0cm\pgf@y=-1.414\n@to@pp@r}
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{south east}{\northeast\wg@tmpa=\pgf@x\south\pgf@x=\wg@tmpa}
+ \anchor{south west}{\northeast\wg@tmpa=\pgf@x\south\pgf@x=-\wg@tmpa}
+ \anchor{south}{\south}
+ \anchor{east}{
+ \northeast\wg@tmpb=\pgf@y\wg@tmpa=\pgf@x%
+ \south\wg@tmpc\pgf@y%
+ \advance\wg@tmpb-\wg@tmpc
+ \divide\wg@tmpb2%
+ \advance\wg@tmpb\wg@tmpc%
+ \pgf@x=\wg@tmpa%
+ \pgf@y=\wg@tmpb}
+ \anchor{west}{
+ \northeast\wg@tmpb=\pgf@y\wg@tmpa=\pgf@x%
+ \south\wg@tmpc\pgf@y%
+ \advance\wg@tmpb-\wg@tmpc
+ \divide\wg@tmpb2%
+ \advance\wg@tmpb\wg@tmpc%
+ \pgf@x=-\wg@tmpa%
+ \pgf@y=\wg@tmpb}
+ \anchor{north}{\northeast\pgf@x=0cm}
+ \inheritanchor[from=natoapp6c base]{upper}
+ \inheritanchor[from=natoapp6c base]{lower}
+ \inheritanchor[from=natoapp6c base]{left}
+ \inheritanchor[from=natoapp6c base]{right}
+ \inheritanchor[from=natoapp6c base]{center}
+ \backgroundpath{%
+ \n@to@hostile@sub%
+ }
+ \behindforegroundpath{%
+ \n@to@hostile@sub%
+ \pgfusepath{stroke}%
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+%
+% \iffalse
+%</natoapp6c>
+% --------------------------------------------------------------------
+% \fi