diff options
author | Norbert Preining <norbert@preining.info> | 2020-01-24 03:00:54 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-01-24 03:00:54 +0000 |
commit | e1192611f0655a1ccaff0dff2f53c7c65fa5db07 (patch) | |
tree | 232f5be17a2221a57cc6515bfe8692772b3a3e89 /graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | |
parent | f7e5d81fe9880913485f7f8c541eeca7adf4c195 (diff) |
CTAN sync 202001240300
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex | 63 |
1 files changed, 55 insertions, 8 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex index 2eaa1cf8e5..5e4cf0e174 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex @@ -231,6 +231,37 @@ {\ctikzvalof{bipoles/open/width}} { } +% multiwire(s) +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/multiwire/height}} +{multiwire} +{\ctikzvalof{bipoles/multiwire/height}} +{\ctikzvalof{bipoles/multiwire/width}} +{ + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} +} + +\pgfcircdeclarebipole +{} +{\ctikzvalof{bipoles/multiwire/height}} +{bmultiwire} +{\ctikzvalof{bipoles/multiwire/height}} +{\ctikzvalof{bipoles/multiwire/width}} +{ + \pgf@circ@res@other=\ctikzvalof{bipoles/multiwire/spacing}\pgf@circ@Rlen + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@other}{\pgf@circ@res@down}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\pgf@circ@res@up}} + \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}} + \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}} + \pgfusepath{draw} +} %% Generic bipole - used as resistor by some (bleah) \pgfcircdeclarebipolescaled{resistors} {} @@ -2997,8 +3028,12 @@ \pgf@circ@draworfill \endpgfscope % get the rotation - \pgfgettransformentries\a\b\temp\temp\temp\temp - \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \ifpgf@circuit@straightinstruments + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \else + \edef\rot{0} + \fi % and unrotate the scope \pgfscope \pgftransformrotate{\rot} @@ -3037,8 +3072,12 @@ \pgf@circ@draworfill % draw the text label % get the rotation - \pgfgettransformentries\a\b\temp\temp\temp\temp - \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \ifpgf@circuit@straightinstruments + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \else + \edef\rot{0} + \fi % and unrotate the scope \pgfscope \pgfsetcolor{\ctikzvalof{color}} @@ -3061,8 +3100,12 @@ \pgf@circ@draworfill % draw the text label % get the rotation - \pgfgettransformentries\a\b\temp\temp\temp\temp - \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \ifpgf@circuit@straightinstruments + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \else + \edef\rot{0} + \fi % and unrotate the scope \pgfscope \pgftransformrotate{\rot} @@ -3118,8 +3161,12 @@ \pgf@circ@draworfill \endpgfscope % get the rotation - \pgfgettransformentries\a\b\temp\temp\temp\temp - \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \ifpgf@circuit@straightinstruments + \pgfgettransformentries\a\b\temp\temp\temp\temp + \pgfmathsetmacro{\rot}{-atan2(\b,\a)} + \else + \edef\rot{0} + \fi % and unrotate the scope \pgfscope \pgftransformrotate{\rot} |