diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-27 01:23:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-27 01:23:48 +0000 |
commit | c2891584a71bef79217edf0f155772dae1f68b61 (patch) | |
tree | aa182bbf18e9a50a6a3c89f4809535b30322f736 /Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty | |
parent | 5647d8caa246f321a52c4b2e3a3c863ebf7be802 (diff) |
circuitikz 0.2.3 (26nov09)
git-svn-id: svn://tug.org/texlive/trunk@16183 c570f23f-e606-0410-a88d-b1316a301751
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}{ |