summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex136
1 files changed, 64 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 012bb2c9f77..a66e907e656 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -57,73 +57,73 @@
}
\anchor{center}{\pgfpointorigin}
\anchor{n}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{ne}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
}
\anchor{nw}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=-\pgf@x
}
\anchor{e}{%
- \ifpgf@circuit@bipole@reversed\else\southwest\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{s}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{se}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=-\pgf@x
}
\anchor{sw}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
}
\anchor{w}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{north}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{east}{%
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{south}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{west}{
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{right}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{above}{
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@x=0cm
}
\anchor{left}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\anchor{below}{%
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@x=0cm
}
\anchor{a}{%
- \ifpgf@circuit@bipole@reversed\southwest\else\northeast\fi
+ \northeast
\pgf@y=0cm
}
\anchor{b} {
- \ifpgf@circuit@bipole@reversed\northeast\else\southwest\fi
+ \southwest
\pgf@y=0cm
}
\savedanchor{\textanchor}{%
@@ -134,8 +134,7 @@
\textanchor
}
\anchorborder{%
- \def\pgf@temp{false}
- \ifpgf@circuit@bipole@reversed\pgf@temp
+ \ifpgf@circuit@bipole@inverted
\pgf@circ@res@left=-\pgf@x
\pgf@circ@res@right=-\pgf@y
\else
@@ -164,7 +163,7 @@
\pgf@circ@res@down = \pgf@y
\pgfstartlinewidth=\pgflinewidth
-
+ \pgfsetcornersarced{\pgfpointorigin}% do not use rounded corners!
#6
\pgfsetlinewidth{\pgfstartlinewidth}
@@ -314,17 +313,17 @@
\divide \pgf@circ@res@step by 6
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgf@circ@res@step}{.5\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{.5\pgf@circ@res@down}}
\pgfusepath{draw}
}
@@ -340,11 +339,11 @@
\pgfusepath{draw}
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{.5\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{.5\pgf@circ@res@down}}
- \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.33\pgf@circ@res@left}{\pgf@circ@res@down}}
@@ -1044,23 +1043,19 @@
%% Black varcap
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/varcap/height}}{fullvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfscope
- \pgftransformxshift{\pgf@circ@res@left}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfusepath{draw,fill}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf@circ@res@temp}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfusepath{draw,fill}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
}
%% Empty generic diode
@@ -1228,30 +1223,27 @@
\anchor{strokepathstart}{
\northeast
\pgf@y=0cm
- \pgf@x=.8\pgf@x
- }
+ \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ \advance\pgf@x by -\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgflinewidth
+ }
\anchor{strokepathend}{
\northeast
\pgf@y=0cm
}
}{\ctikzvalof{bipoles/varcap/height}}{emptyvarcap}{\ctikzvalof{bipoles/varcap/height}}{\ctikzvalof{bipoles/varcap/width}}{
-
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfscope
- \pgftransformxshift{\pgf@circ@res@left}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0pt}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{0pt}}
- \pgfusepath{draw}
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-.8\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@left}{\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \endpgfscope
+ \pgf@circ@res@temp=\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
+ \pgfsetlinewidth{\pgf@circ@res@temp}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{0pt}}
+ \pgfusepath{draw}
+ %
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right-2\pgf@circ@res@temp}{\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
}
%% SPST
@@ -1727,7 +1719,7 @@
\ctikzset{*-d/.style = {\circuitikzbasekey/bipole/nodes/left=full, \circuitikzbasekey/bipole/nodes/right=diamond}}
\ctikzset{d-d/.style = {\circuitikzbasekey/bipole/nodes/left=diamond, \circuitikzbasekey/bipole/nodes/right=diamond}}
-\tikzset{reversed/.style = {\circuitikzbasekey/bipole/reversed=true}}
+\tikzset{reversed/.style = {\circuitikzbasekey/bipole/inverted=true}}
%% The output routine
@@ -1735,7 +1727,7 @@
\def\drawpoles{
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{diamond} }
\ifx\pgf@temp\pgf@circ@temp
- { (\tikztostart) node[diamond] {} }
+ { (\tikztostart) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/left}} \def\pgf@temp{empty} }
\ifx\pgf@temp\pgf@circ@temp
@@ -1749,7 +1741,7 @@
\fi
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{diamond} }
\ifx\pgf@temp\pgf@circ@temp
- { (\tikztotarget) node[diamond] {} }
+ { (\tikztotarget) node[diamondpole] {} }
\else
\pgfextra{ \edef\pgf@circ@temp{\ctikzvalof{bipole/nodes/right}} \def\pgf@temp{empty} }
\ifx\pgf@temp\pgf@circ@temp