summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-24 22:15:16 +0000
committerKarl Berry <karl@freefriends.org>2016-04-24 22:15:16 +0000
commitf819f35d951f23ba4ab4eff799deb8327c1d1e5b (patch)
treedf1365e41a1b77bbed6f23883df7827b3236a8da /Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
parent8458ef4e60e98c3082331d40e037f426af549444 (diff)
circuitikz (24apr16)
git-svn-id: svn://tug.org/texlive/trunk@40729 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex356
1 files changed, 301 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
index 8a1e62e29fc..8a7bd806ea1 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcircbipoles.tex
@@ -153,7 +153,7 @@
#1
\backgroundpath{
- \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
\northeast
\pgf@circ@res@up = \pgf@y
@@ -277,6 +277,35 @@
}
+%% Electrolytic Capacitor
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/ecapacitor/height}}{ecapacitor}{\ctikzvalof{bipoles/ecapacitor/height}}{\ctikzvalof{bipoles/ecapacitor/width}}{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/ecapacitor/width}\pgf@circ@Rlen
+ \divide \pgf@circ@res@step by 5
+ \pgfsetrectcap
+ % % % Draw plus pole
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfsetfillcolor{white}
+ \pgfusepath{draw,fill}
+ % % Draw minus pole
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.4\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfsetfillcolor{black}
+ \pgfusepath{draw,fill}
+ \pgfsetfillcolor{black}
+ % % plus pole annotation
+ \pgftext[right,at=\pgfpoint{1.2\pgf@circ@res@left}{.6\pgf@circ@res@up}]
+ {\pgfkeysvalueof{/tikz/circuitikz/bipoles/ecapacitor/font} $+$}
+}
+
%% Battery
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/battery/height}}{battery}{\ctikzvalof{bipoles/battery/height}}{\ctikzvalof{bipoles/battery/width}}{
@@ -394,10 +423,18 @@
\pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
-
- \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
- \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
-
+ \ifpgf@circ@oldvoltagedirection
+ \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
+ \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
+ \else
+ \ifpgf@circuit@bipole@voltage@backward
+ \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$+$}
+ \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$-$}
+ \else
+ \pgftext[bottom,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@down]{$-$}
+ \pgftext[top,rotate=90,y=\ctikzvalof{bipoles/vsourceam/margin}\pgf@circ@res@up]{$+$}
+ \fi
+ \fi
\pgfusepath{draw}
}
@@ -490,6 +527,51 @@
\pgfusepath{draw}
}
+%% PV Source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/pvsource/height}}{pvsource}{\ctikzvalof{bipoles/pvsource/height}}{\ctikzvalof{bipoles/pvsource/width}}{
+ \pgfpointorigin
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ %Adapted from battery1
+ \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{0}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0}}
+ \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{0}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgfusepath{draw}
+
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@left}{.4\pgf@circ@res@down}}
+
+ \pgfpathmoveto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{.15\pgf@circ@res@right}{.6\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ %Arrow Part
+ \pgfscope
+ \pgfsetarrowsend{latex}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint{.3\pgf@circ@res@left}{0}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{2.2\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint{0}{0.3\pgf@circ@res@up}}{\pgfpointpolar{-45}{1.3\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \endpgfscope
+
+}
+
+%% Empty Source
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/esource/height}}{esource}{\ctikzvalof{bipoles/esource/height}}{\ctikzvalof{bipoles/esource/width}}{
+ \pgfpointorigin
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathellipse{\pgfpointorigin}{\pgfpoint{0}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@left}{0}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfusepath{draw}
+}
+
%% DC Current Source with open shape
\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/dcisource/height}}{dcisource}{\ctikzvalof{bipoles/dcisource/height}}{\ctikzvalof{bipoles/dcisource/width}}{
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -503,8 +585,16 @@
\pgfpathlineto{\pgfpoint{.6\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfusepath{draw}
\pgfscope
+ \ifpgf@circ@oldvoltagedirection
\pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \else
+ \ifpgf@circuit@bipole@current@backward
+ \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgftransformrotate{180}
+ \else
+ \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \fi\fi
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
}
@@ -549,7 +639,15 @@
\pgfpathlineto{\pgfpoint{.7\pgf@circ@res@right}{\pgf@circ@res@zero}}
\pgfusepath{draw}
\pgfscope
- \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \ifpgf@circ@oldvoltagedirection
+ \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \else
+ \ifpgf@circuit@bipole@current@backward
+ \pgftransformshift{\pgfpoint{-.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \pgftransformrotate{180}
+ \else
+ \pgftransformshift{\pgfpoint{.5\pgf@circ@res@right}{\pgf@circ@res@zero}}
+ \fi\fi
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
}
@@ -1605,6 +1703,33 @@
\pgfusepath{draw}
}
+
+%% Piezoelectric Element
+
+\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/piezoelectric/height}}{piezoelectric}{\ctikzvalof{bipoles/piezoelectric/height}}{\ctikzvalof{bipoles/piezoelectric/width}}{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/piezoelectric/width}\pgf@circ@Rlen
+ \divide \pgf@circ@res@step by 5
+
+ %% Outer markings
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \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@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ %% Inner Box
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left+4}{\pgf@circ@res@up-1}}{\pgfpoint{\pgf@circ@res@right-4}{\pgf@circ@res@down+1}}
+ \pgfusepath{draw}
+
+}
+
+
+
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Handling of terminals
@@ -1929,7 +2054,9 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -1969,6 +2096,9 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
% draw circle
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathcircle{\pgfpoint{0}{0}} {\pgf@circ@res@step}
@@ -2016,6 +2146,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2043,6 +2177,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
@@ -2081,6 +2216,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2108,6 +2247,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
@@ -2146,6 +2286,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2173,6 +2317,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.5\pgf@circ@res@step}}
\pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
@@ -2211,6 +2356,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2244,7 +2393,9 @@
\def\textii{D}
\fi\fi
- % draw inner symbol
+ % draw inner symbol
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
@@ -2263,6 +2414,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2296,7 +2451,9 @@
\def\textii{A}
\fi\fi
- % draw inner symbol
+ % draw inner symbol
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
@@ -2314,6 +2471,10 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2352,6 +2513,10 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
@@ -2384,36 +2549,35 @@
%% Amplifier
\pgfcircdeclarebipole{}{
- %\ifpgf@circuit@box
+ \ifpgf@circuit@boxed
\ctikzvalof{bipoles/twoport/width}
- %\else
- % \ctikzvalof{bipoles/amp/width}
- %\fi
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
}{amp}{
- %\ifpgf@circuit@box
+ \ifpgf@circuit@boxed
\ctikzvalof{bipoles/twoport/width}
- %\else
- % \ctikzvalof{bipoles/amp/width}
- % \fi
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
}{
- % \ifpgf@circuit@box
+ \ifpgf@circuit@boxed
\ctikzvalof{bipoles/twoport/width}
- % \else
- % \ctikzvalof{bipoles/amp/width}
- % \fi
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
}{
\pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
% draw outer box
- %\ifpgf@circuit@box
- % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
- %\fi
- % draw outer box
- % draw outer box
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
+ \ifpgf@circuit@boxed
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
% draw input arrow
\ifpgf@circuit@inputarrow
@@ -2423,31 +2587,62 @@
\pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
}
\fi
+
+ \ifpgf@circuit@boxed
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
+ \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
- \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.63\pgf@circ@res@right}{0}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@down}}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
+ \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
+
\pgfpathclose
\pgfusepath{draw}
+
+ % draw inner text
+ \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
}
%% variable amplifier
-\pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vamp/width}}{vamp}{\ctikzvalof{bipoles/vamp/width}}{\ctikzvalof{bipoles/vamp/width}}{
- \pgf@circ@res@step = \ctikzvalof{bipoles/vamp/width}\pgf@circ@Rlen
- \divide \pgf@circ@res@step by 2
-
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
- \pgf@circ@res@other = \pgf@circ@res@left
- \advance\pgf@circ@res@other by \pgf@circ@res@step
+\pgfcircdeclarebipole{}{
+ \ifpgf@circuit@boxed
+ \ctikzvalof{bipoles/twoport/width}
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
+ }{vamp}{
+ \ifpgf@circuit@boxed
+ \ctikzvalof{bipoles/twoport/width}
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
+ }{
+ \ifpgf@circuit@boxed
+ \ctikzvalof{bipoles/twoport/width}
+ \else
+ \ctikzvalof{bipoles/amp/width}
+ \fi
+ }{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/amp/width}\pgf@circ@Rlen
- % draw outer box
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+ % draw outer box
+ \ifpgf@circuit@boxed
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
+
+ % draw input arrow
\ifpgf@circuit@inputarrow
{
\advance \pgf@circ@res@left by -.5\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth
@@ -2455,18 +2650,35 @@
\pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
}
\fi
+
+ \ifpgf@circuit@boxed
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfsetdash{}{0pt} % draw solid line for inner symbol if no box is drawn
+ \pgf@circ@res@step=.7\pgf@circ@res@step % scale amp symbol when inside a box
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
+
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{0.63\pgf@circ@res@right}{0}}
- \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0.75\pgf@circ@res@down}}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0.55\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@step}{0}}
+ \pgfpathlineto{\pgfpoint{-0.5\pgf@circ@res@step}{-0.55\pgf@circ@res@step}}
+
\pgfpathclose
\pgfusepath{draw}
+ % draw inner text
+ \pgftext[center,x=-0.12\pgf@circ@res@step,y=0]{\ctikzvalof{bipoles/twoport/text}}
+
+ % draw arrow
+ \pgfsetlinewidth{\pgfstartlinewidth}
\pgfsetarrowsend{latex}
- \pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0.5\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0.7\pgf@circ@res@right}{0.7\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{-0.8\pgf@circ@res@step}{-0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpoint{0.6\pgf@circ@res@step}{0.6\pgf@circ@res@step}}
\pgfusepath{draw}
}
@@ -2478,7 +2690,11 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2503,6 +2719,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
@@ -2524,6 +2741,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2548,6 +2769,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0.4\pgf@circ@res@left}{0.4\pgf@circ@res@up}}
@@ -2573,7 +2795,11 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2598,6 +2824,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
@@ -2616,6 +2843,10 @@
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2640,6 +2871,7 @@
% draw inner symbol
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0pt}{0.4\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{0pt}{0.4\pgf@circ@res@up}}
@@ -2662,7 +2894,11 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2700,7 +2936,11 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2745,7 +2985,11 @@
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}
\pgf@circ@res@other = \pgf@circ@res@left
\advance\pgf@circ@res@other by \pgf@circ@res@step
-
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
% draw outer box
\pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
\pgfpathrectanglecorners{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
@@ -2760,6 +3004,8 @@
\fi
% draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{0.8\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{0.75\pgf@circ@res@left}{0}}
\pgfpathlineto{\pgfpoint{0.75\pgf@circ@res@right}{0}}