diff options
author | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-02-05 03:03:08 +0000 |
commit | 4b795f65d52cde0d136c0175ce20101946378b54 (patch) | |
tree | 07b9b0c89193d379ff6971be01a8ca1e3e6931ca /graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | |
parent | fc358ce7332053945afe16ced2a271556cdccfb7 (diff) |
CTAN sync 202002050303
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index 5e4cf0e174..cd4b14fcab 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/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 |