summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty')
-rw-r--r--Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty90
1 files changed, 68 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty
index 8a736173244..33e63e6be85 100644
--- a/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty
+++ b/Master/texmf-dist/tex/latex/circuitikz/pgfcircquadpoles.sty
@@ -10,7 +10,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Quadripoles
-\long\def\pgfcircdeclarequadpole#1#2{
+\long\def\pgfcircdeclarequadpole#1#2#3{
\pgfdeclareshape{#1}
{
\anchor{center}{
@@ -25,46 +25,61 @@
\pgf@x=.5\pgf@x
\pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/quadpoles/#1/width}\pgf@x
}
- \anchor{south west}{
+ \anchor{A2}{
\northwest
\pgf@y=-\pgf@y
}
- \anchor{north east}{
+ \anchor{B1}{
\northwest
\pgf@x=-\pgf@x
}
- \anchor{north west}{
+ \anchor{A1}{
\northwest
}
- \anchor{south east}{
+ \anchor{B2}{
\northwest
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
}
- \anchor{A2}{
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{south west}{
\northwest
\pgf@y=-\pgf@y
}
- \anchor{B1}{
+ \anchor{north east}{
\northwest
\pgf@x=-\pgf@x
}
- \anchor{A1}{
+ \anchor{north west}{
\northwest
}
- \anchor{B2}{
+ \anchor{south east}{
\northwest
\pgf@x=-\pgf@x
\pgf@y=-\pgf@y
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
+ }
\anchor{base}{
\northwest
\pgf@x=0pt
}
+ #3
\backgroundpath{
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
@@ -74,7 +89,7 @@
\pgf@circ@res@right = -\pgf@x
\pgf@circ@res@left = \pgf@x
- \pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ %\pgf@circ@Rlen=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
#2
@@ -84,9 +99,40 @@
-\def\pgf@circ@drawtransformerbasic{
+\def\pgf@circ@drawtransformerbasicanchor{
+ \pgfkeysvalueof{/tikz/circuitikz/quadpoles/trans/height}
+ \anchor{AA2}{
+ \northwest
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
+ \pgf@x=.7\pgf@x
+ \pgf@y=-\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
+ }
+ \anchor{BB1}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
+ \pgf@x=.7\pgf@x
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
+ }
+ \anchor{AA1}{
+ \northwest
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
+ \pgf@x=.7\pgf@x
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
+ }
+ \anchor{BB2}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/width1}\pgf@x
+ \pgf@x=.7\pgf@x
+ \pgf@y=-\pgf@y
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/quadpoles/transformer/height1}\pgf@y
+ }
+}
-\def\stretto{.4}
+\def\pgf@circ@drawtransformerbasicbody{
+ \def\stretto{.4}
\pgfscope
\pgfslopedattimetrue
\pgfallowupsidedownattimetrue
@@ -166,13 +212,13 @@
\pgfcircdeclarequadpole{transformer}{
- \pgf@circ@drawtransformerbasic
+ \pgf@circ@drawtransformerbasicbody
-}
+}{\pgf@circ@drawtransformerbasicanchor}
\pgfcircdeclarequadpole{transformer core}{
- \pgf@circ@drawtransformerbasic
+ \pgf@circ@drawtransformerbasicbody
\pgfmoveto{\pgfpoint%
{\ctikzvalof{quadpoles/transformer core/core width}\pgf@circ@res@right}%
@@ -196,7 +242,7 @@
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth}
\pgfusepath{draw}
-}
+}{\pgf@circ@drawtransformerbasicanchor}
\pgfcircdeclarequadpole{gyrator}{
@@ -223,4 +269,4 @@
\pgfpatharc{-90}{90}{.7*\stretto\pgf@circ@res@down}
\pgfusepath{draw}
-}
+}{}