diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex index 5e4cf0e1749..cd4b14fcabb 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex @@ -1,4 +1,7 @@ -% Copyright 2007-2009 by Massimo Redaelli +% Copyright 2018-2020 by Romano Giannetti +% Copyright 2015-2020 by Stefan Lindner +% Copyright 2013-2020 by Stefan Erhardt +% Copyright 2007-2020 by Massimo Redaelli % % This file may be distributed and/or modified % @@ -2832,6 +2835,41 @@ \pgftransformshift{\pgfpoint{2\pgf@circ@res@right}{0pt}} \pgfnode{ocirc}{center}{}{}{\pgfusepath{draw}} } +%%% reed switches +\pgfcircdeclarebipolescaled{switches} +{} +{\ctikzvalof{bipoles/reed/depth}} +{reed} +{\ctikzvalof{bipoles/reed/height}} +{\ctikzvalof{bipoles/reed/width}} +{ + % this is designed to be the same as a "nos". + \pgfmathsetmacro{\@@tmpx}{0.9*\ctikzvalof{bipoles/nos/width}/\ctikzvalof{bipoles/reed/width}} + \pgfmathsetmacro{\@@tmpy}{\ctikzvalof{bipoles/nos/height}/\ctikzvalof{bipoles/reed/height}} + \pgfscope + \pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth} + % eclosure + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@up}{\pgf@circ@res@up}} + \pgfpatharc{90}{-90}{\pgf@circ@res@up} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@up}{-\pgf@circ@res@up}} + \pgfpatharc{270}{90}{\pgf@circ@res@up} + \pgfpathclose + \pgf@circ@draworfill + % switch + \pgfpathmoveto{\pgfpoint{\@@tmpx\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@right}{\@@tmpy\pgf@circ@res@up}} + % connection lines + \pgfsetbuttcap + \pgfusepath{draw} + \endpgfscope + % connection lines + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@left}{0pt}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfpathlineto{\pgfpoint{\@@tmpx\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} +} + % cute switch "to" shapes help function % #1 -> name % #2 -> barposition |