summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex99
1 files changed, 75 insertions, 24 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
index 69235549a7..4c267929b5 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmonopoles.tex
@@ -46,6 +46,8 @@
\ctikzset{monopoles/bareantenna/width/.initial=.25}
\ctikzset{monopoles/bareantenna/label/xanchor/.initial=1}
\ctikzset{monopoles/bareantenna/label/yanchor/.initial=0.5}
+\ctikzset{monopoles/dinantenna/width/.initial=.2}
+\ctikzset{monopoles/dinantenna/height/.initial=.6}
\ctikzset{monopoles/waves/width/.initial=0.5}%
%>>>
@@ -78,7 +80,7 @@
\anchor{left}{\pgfpointorigin}
\anchor{right}{\pgfpointorigin}
\anchor{center}{\pgfpointorigin}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@scaled@Rlen
\pgfscope
@@ -299,7 +301,7 @@
\advance \pgf@y by 0.5\ht\pgfnodeparttextbox
\pgf@x=-.5\wd\pgfnodeparttextbox
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@scaled@Rlen
\pgfscope
@@ -361,7 +363,7 @@
\pgf@x=-.5\wd\pgfnodeparttextbox
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@scaled@Rlen
\pgfscope
@@ -483,7 +485,7 @@
\anchor{text}{\northeast\pgf@xa=\pgf@x\pgf@ya=\pgf@y
\pgfpoint{\dimexpr-.5\wd\pgfnodeparttextbox+.8\pgf@xa}
{\dimexpr-.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@ya}}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
@@ -513,7 +515,7 @@
\def\pgf@circ@antennabody{%
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@scaled@Rlen
\pgfscope
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
@@ -577,11 +579,11 @@
\anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x}
\anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt}
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@scaled@Rlen
\pgf@circ@res@step=0.5\pgf@circ@res@step
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\pgfscope
% define a triangle for clipping the waves
\pgfpathmoveto{\pgfpoint{-2\pgf@circ@res@step}{0pt}}
@@ -601,8 +603,8 @@
}
}
-% the three types of antennas: simple, TX, RX. Notice that you can flip them...
-
+% the four types of antennas: simple, din, TX, RX. Notice that you can flip them...
+%
\pgfdeclareshape{bareantenna}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{RF}}
\saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
@@ -631,10 +633,58 @@
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
\anchor{south east}{\northeast\pgf@y=0pt\relax}
\anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@antennabody
}
}
+%
+\pgfdeclareshape{dinantenna}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{RF}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \anchor{center}{\pgfpointorigin}
+ \savedanchor{\northeast}{
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@circ@res@step=\ctikzvalof{monopoles/dinantenna/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@other=\ctikzvalof{monopoles/dinantenna/height}\pgf@circ@scaled@Rlen
+ \pgf@x=\pgf@circ@res@step
+ \pgf@y=\pgf@circ@res@other
+ }
+ \anchor{text}{
+ \northeast
+ \pgf@y=\dimexpr.5\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
+ }
+ \anchor{top}{\northeast\pgf@x=0pt}
+ \anchor{right}{\northeast\pgf@y=0.5\pgf@y}
+ \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{bottom}{\pgfpointorigin}
+ \anchor{north}{\northeast\pgf@x=0pt}
+ \anchor{east}{\northeast\pgf@y=0.5\pgf@y}
+ \anchor{west}{\northeast\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
+ \anchor{south}{\pgfpointorigin}
+ \anchor{north east}{\northeast}
+ \anchor{north west}{\northeast\pgf@x=-\pgf@x}
+ \anchor{south east}{\northeast\pgf@y=0pt\relax}
+ \anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
+ \pgf@circ@draw@component{
+ \pgfstartlinewidth=\pgflinewidth
+ \pgf@circ@scaled@Rlen=\scaledRlen
+ \pgf@circ@setcolor
+ \pgf@circ@res@right=\ctikzvalof{monopoles/dinantenna/width}\pgf@circ@scaled@Rlen
+ \pgf@circ@res@up=\ctikzvalof{monopoles/dinantenna/height}\pgf@circ@scaled@Rlen
+ \pgfscope
+ \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0pt}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0pt}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0pt}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+ \endpgfscope
+ }
+}
\pgfdeclareshape{bareTXantenna}{
\savedmacro{\ctikzclass}{\edef\ctikzclass{RF}}
@@ -672,7 +722,7 @@
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
\anchor{south east}{\northeast\pgf@y=0pt\relax}
\anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@antennabody
\pgf@circ@antennawaves
}
@@ -713,7 +763,7 @@
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
\anchor{south east}{\northeast\pgf@y=0pt\relax}
\anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@antennabody
\pgftransformxshift{-5.2\pgf@circ@res@step}
\pgf@circ@antennawaves
@@ -770,10 +820,10 @@
\anchor{north west}{\northeast\pgf@x=-\pgf@x}
\anchor{south east}{\northeast\pgf@y=0pt\relax}
\anchor{south west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\northeast
\pgf@circ@res@right=\pgf@x
\pgf@circ@res@up=\pgf@y
@@ -840,7 +890,7 @@
\dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax
}
}
- \behindbackgroundpath{
+ \pgf@circ@draw@component{
\pgfextracty{\pgf@circ@res@up}{\northwest}
\pgfextractx{\pgf@circ@res@right}{\southeast}
\pgfextractx{\pgf@circ@res@left}{\northwest}
@@ -889,7 +939,7 @@
\dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax
}
}
- \behindbackgroundpath{
+ \pgf@circ@draw@component{
\pgfextracty{\pgf@circ@res@up}{\northwest}
\pgfextractx{\pgf@circ@res@right}{\southeast}
\pgfextractx{\pgf@circ@res@left}{\northwest}
@@ -946,7 +996,7 @@
\dimexpr-.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax
}
}
- \behindbackgroundpath{
+ \pgf@circ@draw@component{
\pgfextracty{\pgf@circ@res@up}{\northwest}
\pgfextractx{\pgf@circ@res@right}{\southeast}
\pgfextractx{\pgf@circ@res@left}{\northwest}
@@ -996,7 +1046,7 @@
\pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x
\pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@scaled@Rlen
@@ -1014,7 +1064,7 @@
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfusepath{draw}
\endpgfscope
@@ -1047,7 +1097,7 @@
\pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x
\pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@scaled@Rlen
@@ -1065,7 +1115,7 @@
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfusepath{draw}
\endpgfscope
@@ -1109,7 +1159,7 @@
\pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x
\pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgfstartlinewidth=\pgflinewidth
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@scaled@Rlen
@@ -1127,7 +1177,7 @@
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{4\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{3\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}}
- \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@setcolor
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfusepath{draw}
\endpgfscope
@@ -1177,7 +1227,7 @@
\advance \pgf@x by -.5\wd\pgfnodeparttextbox
\pgf@y=-1.5\ht\pgfnodeparttextbox
}
- \behindforegroundpath{
+ \pgf@circ@draw@component{
\pgf@circ@scaled@Rlen=\scaledRlen
\pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@scaled@Rlen
@@ -1189,6 +1239,7 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0}}
+ \pgf@circ@fill@strokecolor
\pgfusepath{fill}
\pgfsetlinewidth{\pgfstartlinewidth}