diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-10 21:15:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-10 21:15:08 +0000 |
commit | 0adb4af0234da7598911f149b7884b86b514e07d (patch) | |
tree | 1aa91d19135a803261a775221880a00982082242 /Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex | |
parent | d2b8d33bc4070a7246b3cd1d3074b6d369c3ef7d (diff) |
circuitikz (10may19)
git-svn-id: svn://tug.org/texlive/trunk@51071 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex | 1235 |
1 files changed, 819 insertions, 416 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex index e8feabfc80c..66f2d8dd511 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircmonopoles.tex @@ -5,336 +5,692 @@ % 1. under the LaTeX Project Public License and/or % 2. under the GNU Public License. % -% See the file doc/LICENSE for more details. +% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Monopoles %% Ground symbol +% #1 -> name +% #2 -> width +% #3 -> depth +% #4 -> code +\long\def\pgf@circ@declareground#1#2#3#4{ + \pgfdeclareshape{#1}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgf@x=#2\pgf@x + \pgf@y=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgf@y=-#3\pgf@y + } + \anchor{north}{\pgfpointorigin} + \anchor{north east}{\southeast\pgf@y=0pt\relax} + \anchor{east}{\southeast\pgf@y=.5\pgf@y} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\southeast\pgf@y=.5\pgf@y\pgf@x=-\pgf@x} + \anchor{north west}{\southeast\pgf@y=0pt\pgf@x=-\pgf@x} + \anchor{left}{\pgfpointorigin} + \anchor{right}{\pgfpointorigin} + \anchor{center}{\pgfpointorigin} + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen + \pgfscope + \pgfstartlinewidth=\pgflinewidth + #4 + \endpgfscope + } + } +} -\pgfdeclareshape{ground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} - \pgfusepath{draw} - - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope - } +\pgf@circ@declareground{ground}{0.6}{1.6}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.2\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} } -\pgfdeclareshape{rground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope - } +\pgf@circ@declareground{rground}{0.6}{1}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\ctikzvalof{monopoles/rground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfsetroundcap\pgfusepath{draw} } -\pgfdeclareshape{tground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - %\pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{0pt}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{0pt}} - \pgfusepath{draw} - - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope - } +\pgf@circ@declareground{tground}{0.6}{0}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} } -\pgfdeclareshape{sground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}} - \pgfpathclose - \pgfusepath{draw} - - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope - } +\pgf@circ@declareground{sground}{0.6}{1.8}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{-1.8\pgf@circ@res@step}} + \pgfpathclose + \pgf@circ@draworfill } % noiseless ground -\pgfdeclareshape{nground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfpathmoveto{\pgfpoint{1.3\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfpatharc{0}{180}{1.3\pgf@circ@res@step} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - \endpgfscope - } +\pgf@circ@declareground{nground}{0.9}{1.6}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.2\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathmoveto{\pgfpoint{0.9\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} + \pgfpatharc{0}{180}{0.9\pgf@circ@res@step} + \pgfusepath{draw} } % protective ground -\pgfdeclareshape{pground}{ - \anchor{center}{ - \pgfpointorigin - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/ground/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - %\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathcircle{\pgfpoint{0pt}{-\pgf@circ@res@step}} {1.2\pgf@circ@res@step} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - \pgfpathmoveto{\pgfpoint{-.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.8\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.6\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - \endpgfscope - } +\pgf@circ@declareground{pground}{0.9}{1.8}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.4\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1.2\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.25\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1.4\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfpathcircle{\pgfpoint{0pt}{-0.9\pgf@circ@res@step}}{0.9\pgf@circ@res@step} + \pgfusepath{draw} } -% chassis ground -\pgfdeclareshape{cground}{ -\anchor{center}{ - \pgfpointorigin -} -\behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/chassis/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfusepath{draw} +% chassis ground +\pgf@circ@declareground{cground}{1}{2}{ + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/connectionthickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{monopoles/ground/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.00\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.75\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{ 0.75\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{ 0.50\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{ 0.00\pgf@circ@res@step}{-1.50\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-0.25\pgf@circ@res@step}{-2.10\pgf@circ@res@step}} + \pgfusepath{draw} +} + +% Contributed by @fotesan https://github.com/fotesan + +\pgf@circ@declareground{eground}{1.1}{1.7}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.6\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.6\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.1\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{.4\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfusepath{draw} +} - \pgfpathmoveto{\pgfpoint{-1.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{0pt}{-\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-2\pgf@circ@res@step}} - \pgfusepath{draw} - \endpgfscope - } +\pgf@circ@declareground{eground2}{1.1}{1.7}{ + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/monopoles/tground/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{-\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{-1.1\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{-.4\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{-.45\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.25\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathmoveto{\pgfpoint{.2\pgf@circ@res@step}{-1.7\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{.9\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfusepath{draw} } % Contributed by Leonardo Azzinnari \pgfdeclareshape{tlinestub}{ - \anchor{center}{\pgfpointorigin} - \behindforegroundpath{ - \pgfstartlinewidth=\pgflinewidth - - \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen - \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} - - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}} - \pgfusepath{draw} - \pgfscope + \savedanchor{\northeast}{% + \pgf@circ@res@step = \ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + \pgf@x=1.625\pgf@circ@res@step + \pgf@circ@res@step = \ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + \pgf@y=.25\pgf@circ@res@step% + } + % the center is on the left side of the shape for facility of usage + \anchor{north}{\northeast\pgf@x=0.5\pgf@x\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0.5\pgf@x\relax} + \anchor{west}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=0cm\relax} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south west}{\northeast\pgf@x=0cm\pgf@y=-\pgf@y} + \anchor{center}{\pgfpointorigin} + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + + \pgf@circ@res@step=\ctikzvalof{bipoles/tline/width} \pgf@circ@Rlen + + \pgfscope\begin{pgftransparencygroup} \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}} - \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgf@circ@maybefill + \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} \pgfpathlineto{\pgfpoint{1.5\pgf@circ@res@step}{0.25\pgf@circ@res@step}} \pgfpatharc{90}{-90}{0.125\pgf@circ@res@step and 0.25\pgf@circ@res@step} \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-0.25\pgf@circ@res@step}} \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgf@circ@draworfill + \pgfpathellipse{\pgfpoint{0.5\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0.125\pgf@circ@res@step}{0\pgf@circ@res@step}}{\pgfpoint{0\pgf@circ@res@step}{0.25\pgf@circ@res@step}} + \pgfusepath{draw} + \end{pgftransparencygroup} \endpgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} + } +} + +%% New antennas without tails + +% main body +\def\pgf@circ@antennabody{% + \pgfstartlinewidth=\pgflinewidth + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgfscope + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfsetbeveljoin + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + \pgfsetlinewidth{\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{2\pgf@circ@res@step}} + \pgfusepath{draw} +} + +% Waves for the antennas. +\def\pgf@circ@antennawaves{% + \pgfscope + % define a triangle for clipping the waves + \pgfpathmoveto{\pgfpoint{0pt}{\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4.2\pgf@circ@res@step}{3\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{4.2\pgf@circ@res@step}{-1\pgf@circ@res@step}} + \pgfpathclose + \pgfusepath{clip} + % ...and build the waves as clipped circles + \c@pgf@counta=8\pgf@circ@res@other=0.5\pgf@circ@res@step + \pgfmathloop% + \ifnum\c@pgf@counta>2 + \pgfpathcircle{\pgfpoint{0pt}{\pgf@circ@res@step}}{\the\c@pgf@counta*\pgf@circ@res@other} + \advance\c@pgf@counta-1\relax% + \repeatpgfmathloop + \pgfusepath{draw} + \endpgfscope +} + + +% additional shape with the waves +\pgfdeclareshape{waves}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{top}{\northeast\pgf@x=0pt} + \anchor{right}{\northeast\pgf@y=0pt} + \anchor{left}{\northeast\pgf@x=-\pgf@x\pgf@y=0pt} + \anchor{bottom}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt} + \anchor{north}{\northeast\pgf@x=0pt} + \anchor{north east}{\northeast} + \anchor{east}{\northeast\pgf@y=0pt} + \anchor{south east}{\northeast\pgf@y=-\pgf@y} + \anchor{south}{\northeast\pgf@y=-\pgf@y\pgf@x=0pt} + \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@res@step=\ctikzvalof{monopoles/waves/width}\pgf@circ@Rlen + \pgf@circ@res@step=0.5\pgf@circ@res@step + \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfscope + % define a triangle for clipping the waves + \pgfpathmoveto{\pgfpoint{-2\pgf@circ@res@step}{0pt}} + \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{2\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{2.1\pgf@circ@res@step}{-2\pgf@circ@res@step}} + \pgfpathclose + \pgfusepath{clip} + % ...and build the waves as clipped circles + \c@pgf@counta=8\pgf@circ@res@other=0.5\pgf@circ@res@step + \pgfmathloop% + \ifnum\c@pgf@counta>1 + \pgfpathcircle{\pgfpoint{-2\pgf@circ@res@step}{0pt}}{\the\c@pgf@counta*\pgf@circ@res@other} + \advance\c@pgf@counta-1\relax% + \repeatpgfmathloop \pgfusepath{draw} - \endpgfscope - } + \endpgfscope + } +} + +% the three types of antennas: simple, TX, RX. Notice that you can flip them... + +\pgfdeclareshape{bareantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@y=\dimexpr\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} + \behindforegroundpath{ + \pgf@circ@antennabody + } } - +\pgfdeclareshape{bareTXantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@x=\dimexpr-\pgf@x-\wd\pgfnodeparttextbox\relax + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{waves}{ + \northeast + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=4.2\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \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} + \behindforegroundpath{ + \pgf@circ@antennabody + \pgf@circ@antennawaves + } +} +\pgfdeclareshape{bareRXantenna}{ + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step + \pgf@y=2\pgf@circ@res@step + } + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/bareantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/bareantenna/label/yanchor}\pgf@y + \pgf@y=\dimexpr\pgf@y+.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + \anchor{waves}{ + \northeast + \pgf@circ@res@step=\ctikzvalof{monopoles/bareantenna/width}\pgf@circ@Rlen + \pgf@x=-4.2\pgf@circ@res@step + \pgf@y=\pgf@circ@res@step + } + \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} + \behindforegroundpath{ + \pgf@circ@antennabody + \pgftransformxshift{-5.2\pgf@circ@res@step} + \pgf@circ@antennawaves + } +} + +% Microstrip monopoles + +\pgfdeclareshape{mslstub}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{bipoles/mstline/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=-.5\pgf@y + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{bipoles/mstline/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\northwest\pgf@y=0pt\relax} + \anchor{left}{\northwest\pgf@y=0pt\relax} + \anchor{right}{\southeast\pgf@y=0pt\relax} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope + } +} + +\pgfdeclareshape{msrstub}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/msrstub/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=0pt\relax + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{monopoles/msrstub/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{monopoles/msrstub/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\pgfpointorigin} + \anchor{left}{\pgfpointorigin} + \anchor{right}{\pgfpointorigin} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr.5\dp\pgfnodeparttextbox+.5\ht\pgfnodeparttextbox+\pgf@circ@res@up\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.25*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpointpolar{135}{\pgf@circ@res@step}} + \pgfpatharc{135}{45}{\pgf@circ@res@step} + \pgfpathlineto{\pgfpointpolar{45}{\pgf@circ@res@up}} + \pgfpatharc{45}{135}{\pgf@circ@res@up} + \pgfclosepath + % \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgf@circ@draworfill + \endpgfscope + } +} + +\pgfdeclareshape{msport}{ + \savedanchor{\southeast}{ + \pgf@x=\ctikzvalof{monopoles/msport/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=-.5\pgf@y + } + \savedanchor{\northwest}{ + \pgf@x=\ctikzvalof{monopoles/msport/width}\pgf@circ@Rlen + \pgf@x=-.5\pgf@x + \pgf@y=\ctikzvalof{bipoles/mstline/height}\pgf@circ@Rlen + \pgf@y=.5\pgf@y + } + \anchor{north}{\northwest\pgf@x=0pt\relax} + \anchor{north east}{\northwest\pgf@x=-\pgf@x} + \anchor{east}{\southeast\pgf@y=0pt\relax} + \anchor{south east}{\southeast} + \anchor{south}{\southeast\pgf@x=0pt\relax} + \anchor{south west}{\southeast\pgf@x=-\pgf@x} + \anchor{west}{\northwest\pgf@y=0pt\relax} + \anchor{north west}{\northwest} + % + \anchor{center}{\northwest\pgf@y=0pt\relax} + \anchor{left}{\northwest\pgf@y=0pt\relax} + \anchor{right}{\southeast\pgf@y=0pt\relax} + % put the node text above and centered + \anchor{text}{\pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfpoint{-.5\wd\pgfnodeparttextbox}{ + \dimexpr-.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox\relax + } + } + \behindbackgroundpath{ + \pgfextracty{\pgf@circ@res@up}{\northwest} + \pgfextractx{\pgf@circ@res@right}{\southeast} + \pgfextractx{\pgf@circ@res@left}{\northwest} + \pgfextracty{\pgf@circ@res@down}{\southeast} + \pgfmathsetlength{\pgf@circ@res@step}{0.5*\pgf@circ@res@up} + \pgfstartlinewidth=\pgflinewidth + \pgfscope + \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@down}} + \pgfpathclose + \pgf@circ@draworfill + \endpgfscope + } +} +% Legacy antennas (with tails) + +\def\pgf@circ@shift@antenna@xy#1#2{% + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@y=\dimexpr\pgf@y+#2\pgf@circ@res@step + \pgf@x=\dimexpr\pgf@x+#1\pgf@circ@res@step +\relax} \pgfdeclareshape{antenna}{ -\anchor{center}{\pgfpointorigin} - \savedanchor{\northeast}{ - \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen - \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth - \pgf@y=6\pgf@circ@res@step - } - \anchor{text}{ - \northeast - \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x - \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y - } - \behindforegroundpath{ - \pgfstartlinewidth=\pgflinewidth - \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen - - % \pgfpathmoveto{\pgfpointorigin} - % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} - % \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} - % \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{0}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{0}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{0}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{0}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/antenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/antenna/label/yanchor}\pgf@y + } + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgftransformxshift{ -4\pgf@circ@res@step } \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - - \pgfusepath{draw} - - \pgfscope - \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \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{\pgfkeysvalueof{/tikz/circuitikz/color}} - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - \pgfusepath{draw} - \endpgfscope - \pgfsetlinewidth{\pgfstartlinewidth} - - } - } + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \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{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + \pgfsetlinewidth{\pgfstartlinewidth} + + } +} \pgfdeclareshape{txantenna}{ - \anchor{center}{\pgfpointorigin} - \savedanchor{\northeast}{ - \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen - \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth - \pgf@y=6\pgf@circ@res@step - } - \anchor{text}{ - \northeast - \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x - \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y - } - \behindforegroundpath{ - \pgfstartlinewidth=\pgflinewidth - \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen - - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} - \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - - \pgfusepath{draw} - - \pgfscope - \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \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{\pgfkeysvalueof{/tikz/circuitikz/color}} - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - \pgfusepath{draw} - \endpgfscope - \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}} -% \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{4}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{4}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{4}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/txantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/txantenna/label/yanchor}\pgf@y + } + \behindforegroundpath{ + \pgfstartlinewidth=\pgflinewidth + \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \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{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + \pgfpathmoveto{\pgfpoint{5.5\pgf@circ@res@step}{6\pgf@circ@res@step}} + % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} \pgfpatharc{30}{-30}{2\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{6.25\pgf@circ@res@step}} \pgfpatharc{30}{-30}{2.5\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.5\pgf@circ@res@step}} @@ -345,161 +701,208 @@ \pgfpatharc{30}{-30}{4\pgf@circ@res@step} \pgfusepath{draw} \pgfsetlinewidth{\pgfstartlinewidth} - - } - } + + } +} \pgfdeclareshape{rxantenna}{ - \anchor{center}{\pgfpointorigin} - \savedanchor{\northeast}{ - \pgf@circ@res@step=\ctikzvalof{monopoles/txantenna/width}\pgf@circ@Rlen - \pgf@x=5\pgf@circ@res@step%-0.5\pgflinewidth - \pgf@y=6\pgf@circ@res@step - } - \anchor{text}{ - \northeast - \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x - \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y - } + \anchor{center}{\pgfpointorigin} + \savedanchor{\northeast}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/antenna/width}\pgf@circ@Rlen + \pgf@x=\pgf@circ@res@step%-0.5\pgflinewidth + \pgf@y=4\pgf@circ@res@step + } + \anchor{north}{\northeast\pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{2}} + \anchor{east}{\northeast\pgf@y=0cm\pgf@circ@shift@antenna@xy{4}{3}\relax} + \anchor{south}{\northeast\pgf@y=-\pgf@y \pgf@x=0cm\pgf@circ@shift@antenna@xy{2}{4}\relax} + \anchor{west}{\northeast\pgf@y=0cm\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{3}} + \anchor{north east}{\northeast\pgf@circ@shift@antenna@xy{4}{2}} + \anchor{north west}{\northeast\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{2}} + \anchor{south east}{\northeast\pgf@y=-\pgf@y\pgf@circ@shift@antenna@xy{4}{4}} + \anchor{south west}{\northeast\pgf@y=-\pgf@y\pgf@x=-\pgf@x\pgf@circ@shift@antenna@xy{1}{4}} + \anchor{text}{ + \northeast + \pgf@x=\ctikzvalof{monopoles/rxantenna/label/xanchor}\pgf@x + \pgf@y=\ctikzvalof{monopoles/rxantenna/label/yanchor}\pgf@y + } \behindforegroundpath{ \pgfstartlinewidth=\pgflinewidth \pgf@circ@res@step=\ctikzvalof{monopoles/rxantenna/width}\pgf@circ@Rlen - - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} - \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} - \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - - \pgfusepath{draw} - - \pgfscope - \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} - \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{\pgfkeysvalueof{/tikz/circuitikz/color}} - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - \pgfusepath{draw} - \endpgfscope - - \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}} -% \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} - \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}} - \pgfpatharc{150}{210}{3.5\pgf@circ@res@step} - \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}} - \pgfpatharc{150}{210}{3\pgf@circ@res@step} - \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}} - \pgfpatharc{150}{210}{2.5\pgf@circ@res@step} - \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}} - \pgfpatharc{150}{210}{2\pgf@circ@res@step} - \pgfusepath{draw} - \pgfsetlinewidth{\pgfstartlinewidth} - - } + + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step}{0pt}} + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{0pt}} + \pgfpathlineto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + + \pgfusepath{draw} + + \pgfscope + \pgfpathmoveto{\pgfpoint{4\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{5\pgf@circ@res@step-0.5\pgflinewidth}{6\pgf@circ@res@step}} + \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{\pgfkeysvalueof{/tikz/circuitikz/color}} + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + \pgfusepath{draw} + \endpgfscope + + \pgfpathmoveto{\pgfpoint{6\pgf@circ@res@step}{7\pgf@circ@res@step}} + % \pgfpatharc{60}{-60}{\pgf@circ@res@step and \pgf@circ@res@step} + \pgfpatharc{150}{210}{4\pgf@circ@res@step} \pgfpathmoveto{\pgfpoint{6.5\pgf@circ@res@step}{6.75\pgf@circ@res@step}} + \pgfpatharc{150}{210}{3.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7\pgf@circ@res@step}{6.5\pgf@circ@res@step}} + \pgfpatharc{150}{210}{3\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{7.5\pgf@circ@res@step}{6.25\pgf@circ@res@step}} + \pgfpatharc{150}{210}{2.5\pgf@circ@res@step} + \pgfpathmoveto{\pgfpoint{8\pgf@circ@res@step}{6\pgf@circ@res@step}} + \pgfpatharc{150}{210}{2\pgf@circ@res@step} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + + } } % Vcc \pgfdeclareshape{vcc}{ -\anchor{center}{\pgfpointorigin} -\anchor{text}{ - \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen - \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} - \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} - \pgf@x=0pt - \pgf@y=2\pgf@circ@res@step - \advance \pgf@y by 0.5\ht\pgfnodeparttextbox - \pgf@x=-.5\wd\pgfnodeparttextbox - } -\behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope -} + \savedanchor{\northeast}{% + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@circ@res@step + \pgf@y=3\pgf@x% + } + \anchor{north}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y\relax} + \anchor{south}{\pgfpointorigin} + \anchor{west}{\northeast\pgf@y=0.5\pgf@y\pgf@x=-\pgf@x} + \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} + \anchor{center}{\pgfpointorigin} + \anchor{text}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} + \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{2\pgf@circ@res@step+2\ht\pgfnodeparttextbox}} + \pgf@x=0pt + \pgf@y=2\pgf@circ@res@step + \advance \pgf@y by 0.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{1.5\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{1.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{.8\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } } % Vee \pgfdeclareshape{vee}{ -\anchor{center}{\pgfpointorigin} -\anchor{text}{ - \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen - \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} - \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} - \pgf@x=0pt - \pgf@y=-2\pgf@circ@res@step - \advance \pgf@y by -1.5\ht\pgfnodeparttextbox - \pgf@x=-.5\wd\pgfnodeparttextbox - } - -\behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}} - \pgfusepath{draw} - - \pgfstartlinewidth=\pgflinewidth - \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} - - \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}} - \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} - \pgfusepath{draw} - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope -} + \savedanchor{\northeast}{% + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgf@x=.5\pgf@circ@res@step + \pgf@y=-3\pgf@x% + } + \anchor{south}{\northeast\pgf@x=0cm\relax} + \anchor{east}{\northeast\pgf@y=0.5\pgf@y\relax} + \anchor{north}{\pgfpointorigin} + \anchor{west}{\northeast\pgf@y=0.5\pgf@y\pgf@x=-\pgf@x} + \anchor{south east}{\northeast} + \anchor{south west}{\northeast\pgf@x=-\pgf@x} + \anchor{north east}{\northeast\pgf@y=0pt\relax} + \anchor{north west}{\northeast\pgf@y=0pt\pgf@x=-\pgf@x} + \anchor{center}{\pgfpointorigin} + \anchor{text}{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{-.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} + \pgfpathmoveto{\pgfpoint{.5\wd\pgfnodeparttextbox}{-2\pgf@circ@res@step-2\ht\pgfnodeparttextbox}} + \pgf@x=0pt + \pgf@y=-2\pgf@circ@res@step + \advance \pgf@y by -1.5\ht\pgfnodeparttextbox + \pgf@x=-.5\wd\pgfnodeparttextbox + } + + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/vcc/width}\pgf@circ@Rlen + + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{0pt}{-1.5\pgf@circ@res@step}} + \pgfusepath{draw} + + \pgfstartlinewidth=\pgflinewidth + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth} + + \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0}{-1.5\pgf@circ@res@step}} + \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{-.8\pgf@circ@res@step}} + \pgfusepath{draw} + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } } % match \pgfdeclareshape{match}{ - \anchor{center}{ - \pgfpointorigin - } - \anchor{text}{ - \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen - \pgf@x=1.5\pgf@x - \advance \pgf@x by -.5\wd\pgfnodeparttextbox - \pgf@y=-1.5\ht\pgfnodeparttextbox - } - \behindforegroundpath{ - \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen - - \pgfscope - \pgfpathmoveto{\pgfpointorigin} - \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}} - \pgfusepath{draw} - - \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}} - \pgfusepath{fill} - - \pgfsetlinewidth{\pgfstartlinewidth} - - \endpgfscope - } + \savedanchor{\northeast}{% + \pgf@circ@res@step = \ctikzvalof{monopoles/match/width} \pgf@circ@Rlen + \pgf@x=2\pgf@circ@res@step + \pgf@circ@res@step = \ctikzvalof{monopoles/match/width} \pgf@circ@Rlen + \pgf@y=.5\pgf@circ@res@step% + } + % the center is on the left side of the shape for facility of usage + \anchor{north}{\northeast\pgf@x=0.5\pgf@x\relax} + \anchor{east}{\northeast\pgf@y=0cm\relax} + \anchor{south}{\northeast\pgf@y=0pt\pgf@x=0.5\pgf@x\relax} + \anchor{west}{\pgfpointorigin} + \anchor{north east}{\northeast} + \anchor{north west}{\northeast\pgf@x=0cm\relax} + \anchor{south east}{\northeast\pgf@y=0pt\relax} + \anchor{south west}{\pgfpointorigin} + \anchor{center}{ + \pgfpointorigin + } + \anchor{text}{ + \pgf@x=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen + \pgf@x=1.5\pgf@x + \advance \pgf@x by -.5\wd\pgfnodeparttextbox + \pgf@y=-1.5\ht\pgfnodeparttextbox + } + \behindforegroundpath{ + \pgf@circ@res@step=\ctikzvalof{monopoles/match/width}\pgf@circ@Rlen -} + \pgfscope + \pgfpathmoveto{\pgfpointorigin} + \pgfpathlineto{\pgfpoint{2\pgf@circ@res@step}{0pt}} + \pgfusepath{draw} + \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}} + \pgfusepath{fill} + + \pgfsetlinewidth{\pgfstartlinewidth} + + \endpgfscope + } +} \endinput |