diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty | 73 |
1 files changed, 65 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty index 29a8eb327f3..8a736173244 100644 --- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty +++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty @@ -10,7 +10,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Quadripoles -\newcommand{\pgfcircdeclarequadpole}[2]{ +\long\def\pgfcircdeclarequadpole#1#2{ \pgfdeclareshape{#1} { \anchor{center}{ @@ -84,12 +84,9 @@ +\def\pgf@circ@drawtransformerbasic{ - - -\pgfcircdeclarequadpole{transformer}{ - - \def\stretto{.4} +\def\stretto{.4} \pgfscope \pgfslopedattimetrue \pgfallowupsidedownattimetrue @@ -102,7 +99,21 @@ {\stretto\pgf@circ@res@left}% {\pgf@circ@res@down}% } - \pgfnode{inductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{fullgenericshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \else% + \def\pgf@temp{cute} + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{cuteinductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \else% + \pgfnode{americaninductorshape}{center}{}{pgf@inductor1}{\pgfusepath{stroke}} + \fi% + \fi% + + \endpgfscope \pgfscope \pgfslopedattimetrue @@ -116,7 +127,20 @@ {\stretto\pgf@circ@res@right}% {\pgf@circ@res@up}% } - \pgfnode{inductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + + \edef\pgf@circ@temp{\ctikzvalof{inductor}}% + \def\pgf@temp{european}% + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{fullgenericshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \else% + \def\pgf@temp{cute} + \ifx\pgf@temp\pgf@circ@temp% + \pgfnode{cuteinductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \else% + \pgfnode{americaninductorshape}{center}{}{pgf@inductor2}{\pgfusepath{stroke}} + \fi% + \fi% + \endpgfscope \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}} @@ -137,9 +161,42 @@ \pgfusepath{draw} +} + + +\pgfcircdeclarequadpole{transformer}{ + + \pgf@circ@drawtransformerbasic } +\pgfcircdeclarequadpole{transformer core}{ + + \pgf@circ@drawtransformerbasic + + \pgfmoveto{\pgfpoint% + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% + } + \pgflineto{ + \pgfpoint + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% + } + + \pgfmoveto{\pgfpoint% + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% + } + \pgflineto{ + \pgfpoint + {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% + } + + \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth} + \pgfusepath{draw} +} \pgfcircdeclarequadpole{gyrator}{ |