diff options
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex')
-rw-r--r-- | graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex index facb041eff..31890ea44d 100644 --- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex +++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex @@ -180,6 +180,12 @@ } } +%% Null styles that can be used to change individually the L1 and L2 +%% inductors of the transformer. + +\ctikzset{transformer L1/.style={}} +\ctikzset{transformer L2/.style={}} + \def\pgf@circ@drawtransformerbasicbody{ \pgfscope \pgfslopedattimetrue @@ -194,6 +200,7 @@ {\pgf@circ@res@down}% } + \pgfkeys{\circuitikzbasekey/.cd, transformer L1} \edef\pgf@circ@temp{\ctikzvalof{inductor}}% \def\pgf@temp{european}% \ifx\pgf@temp\pgf@circ@temp% @@ -222,6 +229,7 @@ {\pgf@circ@res@up}% } + \pgfkeys{\circuitikzbasekey/.cd, transformer L2} \edef\pgf@circ@temp{\ctikzvalof{inductor}}% \def\pgf@temp{european}% \ifx\pgf@temp\pgf@circ@temp% @@ -266,23 +274,34 @@ \pgf@circ@drawtransformerbasicbody + % use the chocke line thickness + \pgfsetlinewidth{\ctikzvalof{bipoles/cutechoke/cthick}\pgflinewidth} + + % Find the distance from center for the lines representing the core + % the 2.5 is for backward compatibility --- the distance was calculated as a fraction + % of the whole component, now as a fraction of the distance between coils, to be + % compatible with the quadpoles "inner" style. + \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@right} + \pgfmoveto{\pgfpoint% - {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + {\pgf@circ@res@other}% {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% } \pgflineto{ - \pgfpoint - {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}% + \pgfpoint% + {\pgf@circ@res@other}% {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% } + %% this should be just -\pgf@circ@res@other, but in case someone define an asymmetric trafo someday... + \pgfmathsetlength{\pgf@circ@res@other}{2.5*\stretto*\ctikzvalof{quadpoles/transformer core/core width}*\pgf@circ@res@left} \pgfmoveto{\pgfpoint% - {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + {\pgf@circ@res@other}% {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@down}% } \pgflineto{ - \pgfpoint - {\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@left}% + \pgfpoint% + {\pgf@circ@res@other}% {\ctikzvalof{quadpoles/transformer core/core height}\pgf@circ@res@up}% } |