summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx')
-rw-r--r--macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx70
1 files changed, 70 insertions, 0 deletions
diff --git a/macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx b/macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx
new file mode 100644
index 0000000000..614bf8f95c
--- /dev/null
+++ b/macros/latex/contrib/wargame/source/natoapp6c/frames/base.dtx
@@ -0,0 +1,70 @@
+% \iffalse
+% --------------------------------------------------------------------
+%<*natoapp6c>
+% \fi
+%
+% First, the generic bounding box symbol for all markers.
+%
+% \begin{NatoAppFrame}{natoapp6c base}
+%
+% Place-holder symbol. This shape will form the basis of many of
+% the other frame shapes. We define the relevant sizes and
+% anchors.
+%
+% \begin{macrocode}
+\pgfdeclareshape{natoapp6c base}{%
+ \saveddimen\radius{\pgf@x=\n@to@pp@r}
+ \saveddimen\liney{\pgf@x=.2cm}
+ \saveddimen\linex{\pgf@x=0.41cm}
+ \savedanchor\center{\pgf@x=0cm\pgf@y=0cm}
+ \savedanchor\upper{\pgf@x=0cm\pgf@y=0.35cm}
+ \anchor{north east}{\pgf@x=\radius\pgf@y=\radius}
+ \anchor{south west}{\pgf@x=-\radius\pgf@y=-\radius}
+ \anchor{north west}{\pgf@x=-\radius\pgf@y=\radius}
+ \anchor{south east}{\pgf@x=\radius\pgf@y=-\radius}
+ \anchor{south}{\pgf@x=0cm\pgf@y=-\radius}
+ \anchor{north}{\pgf@x=0cm\pgf@y=\radius}
+ \anchor{west}{\pgf@x=-\radius\pgf@y=0cm}
+ \anchor{east}{\pgf@x=\radius\pgf@y=0cm}
+ \anchor{center}{\center}
+ \anchor{upper}{\upper}
+ \anchor{lower}{\upper\pgf@y=-\pgf@y}
+ \anchor{left}{\upper\pgf@x=-\pgf@y\pgf@y=0cm}
+ \anchor{right}{\upper\pgf@x=\pgf@y\pgf@y=0cm}
+ \savedmacro\init{
+ \def\octagon{%
+ \pgfpathmoveto{\pgfqpointpolar{0} {\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{45} {\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{90} {\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{135}{\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{180}{\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{225}{\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{270}{\radius}}%
+ \pgfpathlineto{\pgfqpointpolar{315}{\radius}}%
+ \pgfpathclose}
+ \def\topline{%
+ \pgfpathmoveto{\pgfqpoint{\linex}{\liney}}%
+ \pgfpathlineto{\pgfqpoint{-\linex}{\liney}}}
+ \def\bottomline{%
+ \pgfpathmoveto{\pgfqpoint{\linex}{-\liney}}%
+ \pgfpathlineto{\pgfqpoint{-\linex}{-\liney}}}
+ }
+ \backgroundpath{%
+ \init%
+ \octagon}
+ \behindforegroundpath{%
+ \init%
+ \octagon%
+ \pgfusepath{stroke}%
+ \topline%
+ \pgfusepath{stroke}%
+ \bottomline%
+ \pgfusepath{stroke}%
+ }
+}
+% \end{macrocode}
+% \end{NatoAppFrame}
+% \iffalse
+%</natoapp6c>
+% --------------------------------------------------------------------
+% \fi