summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex')
-rw-r--r--Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex1535
1 files changed, 1005 insertions, 530 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
index 148a1564e49..5c8313efe67 100644
--- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
+++ b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex
@@ -11,227 +11,8 @@
%% Tripoles
-\pgfdeclareshape{mixer}
-{
- \savedanchor\northwest{
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
- \pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
- \pgf@x=.5\pgf@x
- }
- \anchor{center}{
- \pgfpointorigin
- }
- \anchor{left}{%
- \northwest
- \pgf@y=0pt
- }
- \anchor{in 1}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in1}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in 2}{
- \northwest
- \pgf@y=-\pgf@y
- \pgf@x=0pt
- }
- \anchor{in2}{
- \northwest
- \pgf@y=-\pgf@y
- \pgf@x=0pt
- }
- \anchor{out}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{center}{
- \pgf@y=0pt
- \pgf@x=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \backgroundpath{
- \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-
- \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
-
- \pgfscope
- \pgfstartlinewidth=\pgflinewidth
-
- % draw outer circle
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
- \pgfusepath{draw}
-
- % draw inner stuff
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
- }
-}
-
-\pgfdeclareshape{adder}
-{
- \savedanchor\northwest{
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
- \pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
- \pgf@x=.5\pgf@x
- }
- \anchor{center}{
- \pgfpointorigin
- }
- \anchor{left}{%
- \northwest
- \pgf@y=0pt
- }
- \anchor{in 1}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in1}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{in 2}{
- \northwest
- \pgf@y=-\pgf@y
- \pgf@x=0pt
- }
- \anchor{in2}{
- \northwest
- \pgf@y=-\pgf@y
- \pgf@x=0pt
- }
- \anchor{out}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{center}{
- \pgf@y=0pt
- \pgf@x=0pt
- }
- \anchor{east}{
- \northwest
- \pgf@y=0pt
- \pgf@x=-\pgf@x
- }
- \anchor{west}{
- \northwest
- \pgf@y=0pt
- }
- \anchor{south}{
- \northwest
- \pgf@x=0pt
- \pgf@y=-\pgf@y
- }
- \anchor{north}{
- \northwest
- \pgf@x=0pt
- }
- \anchor{south west}{
- \northwest
- \pgf@y=-\pgf@y
- }
- \anchor{north east}{
- \northwest
- \pgf@x=-\pgf@x
- }
- \anchor{north west}{
- \northwest
- }
- \anchor{south east}{
- \northwest
- \pgf@x=-\pgf@x
- \pgf@y=-\pgf@y
- }
- \backgroundpath{
- \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
-
- \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
-
- \pgfscope
- \pgfstartlinewidth=\pgflinewidth
-
- % draw outer circle
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
- \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
- \pgfusepath{draw}
-
- % draw inner stuff
- \pgfsetlinewidth{\pgfstartlinewidth}
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
- \pgfpathmoveto{\pgfpointorigin}
- \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
- \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
- }
-}
-
-
- \pgfdeclareshape{spdt}
+\pgfdeclareshape{spdt}
{
\savedanchor\northwest{%
\pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
@@ -1062,7 +843,7 @@
\anchor{text}{
\northeast
\pgfpoint
- {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left)}
+ {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@circ@res@left)}
{0.6\pgf@y}
}
%
@@ -1113,10 +894,19 @@
\anchor{south east}{
\northeast
\pgf@y=-\pgf@y
- }
-
+ }
+ \anchor{B}{
+ \left
+ }
+ \anchor{base}{
+ \left
+ }
+ \anchor{nobase}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
+ }
#2
- \backgroundpath{
+ \backgroundpath{
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
%
%
@@ -1133,203 +923,6 @@
}
}
-
-
-
-
-
-\long\def\pgfcircdeclaremos#1#2#3{
- \pgfcircdeclaretransistor{#1}{
- \anchor{G}{
- \left
- }
- \anchor{gate}{
- \left
- }
- \anchor{B}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
- }
- \anchor{base}{
- \left
- \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/base width}\pgf@x
- }
- #2
- }
- {#3}
-}
-
-
-
-
-
-
-
-
-
-\pgfcircdeclaremos{nmos}{
- \anchor{D}{
- \northeast
- }
- \anchor{drain}{
- \northeast
- }
- \anchor{S}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{source}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \ifpgf@circuit@mos@arrows
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.6}{%
- \pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
- }{%
- \pgfpoint
- {\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \fi
-
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
-}
-
-
-\pgfcircdeclaremos{pmos}{
- \anchor{S}{
- \northeast
- }
- \anchor{source}{
- \northeast
- }
- \anchor{D}{
- \northeast
- \pgf@y=-\pgf@y
- }
- \anchor{drain}{
- \northeast
- \pgf@y=-\pgf@y
- }
-}{%
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
- \pgfusepath{draw}
-
- \ifpgf@circuit@mos@arrows
- \pgfscope
- \pgfslopedattimetrue
- \pgfallowupsidedownattimetrue
- \pgfresetnontranslationattimefalse
- \pgftransformlineattime{.4}{%
- \pgfpoint%
- {\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
- }{%
- \pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
- }
- \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
- \endpgfscope
- \fi
-
- \pgfscope
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
- \pgfsetlinewidth{2\pgflinewidth}
- \pgfusepath{draw}
- \endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
- \pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
-
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
-
- \pgfpathcircle{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
- {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
- \pgfusepath{draw,fill}
-
-}
-
-
-
-
-
-
-
\pgfcircdeclaretransistor{pnp}{
\anchor{E}{
\northeast
@@ -1337,12 +930,6 @@
\anchor{emitter}{
\northeast
}
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
\anchor{C}{
\northeast
\pgf@y=-\pgf@y
@@ -1354,28 +941,28 @@
}{
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@up}}
\pgfusepath{draw}
\pgfscope
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@down}}
\pgfsetlinewidth{2\pgflinewidth}
\pgfusepath{draw}
\endpgfscope
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfusepath{draw}
@@ -1386,20 +973,45 @@
\pgftransformlineattime{.5}{%
\pgfpoint%
{\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height}\pgf@circ@res@up}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height}\pgf@circ@res@up}%
}{%
\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate height 2}\pgf@circ@res@up}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base height 2}\pgf@circ@res@up}%
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
+ \ifpgf@circuit@bpt@drawphoto
+ \pgfscope
+ \pgfsetarrowsstart{latex'}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \else
+ \ifpgf@circuit@bpt@drawbase
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pnp/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+ \fi
}
@@ -1414,12 +1026,6 @@
\anchor{collector}{
\northeast
}
- \anchor{B}{
- \left
- }
- \anchor{base}{
- \left
- }
\anchor{E}{
\northeast
\pgf@y=-\pgf@y
@@ -1431,28 +1037,28 @@
}{%
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@up}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@up}}
\pgfusepath{draw}
\pgfscope
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}}
\pgfsetlinewidth{2\pgflinewidth}
\pgfusepath{draw}
\endpgfscope
\pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@down}}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
\pgfusepath{draw}
@@ -1462,22 +1068,46 @@
\pgfresetnontranslationattimefalse
\pgftransformlineattime{.5}{%
\pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height 2}\pgf@circ@res@down}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height 2}\pgf@circ@res@down}%
}{%
\pgfpoint{\pgf@circ@res@right}%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate height}\pgf@circ@res@down}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base height}\pgf@circ@res@down}%
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
- \pgfpathmoveto{\pgfpoint
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/gate width}\pgf@circ@res@left}
- {\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
- \pgfusepath{draw}
-
+ \ifpgf@circuit@bpt@drawphoto
+ \pgfscope
+ \pgfsetarrowsstart{latex'}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.3\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \pgfpathmoveto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.05\pgf@circ@res@left}{-0.1\pgf@circ@res@up}}}
+ \pgfpathlineto{\pgfpointadd{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ {\pgfpoint{0.5\pgf@circ@res@left}{0.1\pgf@circ@res@up}}}
+ \pgfusepath{draw}
+ \endpgfscope
+ \else
+ \ifpgf@circuit@bpt@drawbase
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/npn/base width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+ \fi
}
@@ -1667,18 +1297,346 @@
%%
% IGFET (e.g. MOSFET)
\long\def\pgfcircdeclarefet#1#2#3{
- \pgfcircdeclaretransistor{#1}{
- \anchor{B}{
- \left
- \pgf@x=\pgf@circ@res@right
- }
- \anchor{base}{
- \left
- \pgf@x=\pgf@circ@res@right
- }
- #2
- }
- {#3}
+\pgfdeclareshape{#1}{
+ \anchor{center}
+ {\pgfpointorigin}
+ \savedanchor\northeast{% upper right
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x=0pt
+ }
+ \savedanchor\left{%center left
+ \pgf@y=0pt
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/width}\pgf@x
+ }
+ \anchor{text}{
+ \northeast
+ \pgfpoint
+ {12\pgf@circ@res@right +0.2*(\pgf@circ@res@right-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@circ@res@left)}
+ {0.6\pgf@y}
+ }
+ %
+ % pseudo-bipole
+ \anchor{left}{ % south
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+ \anchor{right}{
+ \northeast
+ }
+ \anchor{north}{
+ \northeast
+ \pgf@circ@res@step=\pgf@y
+ \left
+ \pgf@y=\pgf@circ@res@step
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{west}{
+ \left
+ }
+ \anchor{east}{
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }
+ \anchor{south}{
+ \northeast
+ \pgf@circ@res@step=\pgf@y
+ \left
+ \pgf@y=-\pgf@circ@res@step
+ \pgf@x=.5\pgf@x
+ }
+ \anchor{south west}{
+ \northeast
+ \pgf@circ@res@step=\pgf@y
+ \left
+ \pgf@y=-\pgf@circ@res@step
+ }
+ \anchor{north east}{
+ \northeast
+ }
+ \anchor{north west}{
+ \northeast
+ \pgf@circ@res@step=\pgf@y
+ \left
+ \pgf@y=\pgf@circ@res@step
+ }
+ \anchor{south east}{
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+ \anchor{G}{
+ \left
+ }
+ \anchor{gate}{
+ \left
+ }
+ \anchor{B}{
+ \left
+ \pgf@x=\pgf@circ@res@right
+ }
+ \anchor{base}{
+ \left
+ \pgf@x=\pgf@circ@res@right
+ }
+ \anchor{Bulk}{
+ \left
+ \pgf@x=\pgf@circ@res@right
+ }
+ \anchor{nobase}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
+ }
+ \anchor{nogate}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/gate width}\pgf@x
+ }
+ #2
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ %
+ %
+ \northeast
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = \pgf@x
+ \left
+ \pgf@circ@res@left = \pgf@x
+ %
+ #3
+ % BODY DIODE
+ \ifpgf@circuit@fet@bodydiode
+ \drawbodydiode{#1}
+ \fi
+ }
+}
+}
+
+\long\def\drawbodydiode#1{
+ \pgfscope
+ \pgftransformshift{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \ifpgf@circuit@fet@ntype
+ \pgftransformrotate{90}
+ \else
+ \pgftransformrotate{-90}
+ \fi
+ \pgftransformscale{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode scale}}
+ \ifpgf@circuit@fulldiode
+ \pgfnode{fulldiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
+ \else
+ \pgfnode{emptydiodeshape}{center}{}{pgf@bodydiode}{\pgfusepath{fill}}
+ \fi
+ \endpgfscope
+ %Draw upper connection to body diode
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
+ \ifpgf@circuit@fet@ntype
+ \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
+ \else
+ \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
+ \fi
+ \pgfusepath{draw}
+ \pgfscope
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
+ \pgftransformscale{0.5}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+ \endpgfscope{}
+ %Draw lower connection to body diode
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{-\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
+ \ifpgf@circuit@fet@ntype
+ \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
+ \else
+ \pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
+ \fi
+ \pgfusepath{draw}
+ \pgfscope
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\pgfkeysvalueof{/tikz/circuitikz/tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
+ \pgftransformscale{0.5}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
+ \endpgfscope
+}
+
+\pgfcircdeclarefet{nmos}{
+ \anchor{B}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@x
+ }
+ \anchor{base}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@x
+ }
+ \anchor{D}{
+ \northeast
+ }
+ \anchor{drain}{
+ \northeast
+ }
+ \anchor{S}{
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+ \anchor{source}{
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+}{%
+ \pgf@circuit@fet@ntypetrue
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base height}\pgf@circ@res@down}}
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ \pgfusepath{draw}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{.6}{%
+ \pgfpoint%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint
+ {\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nmos/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+}
+
+
+\pgfcircdeclarefet{pmos}{
+ \anchor{B}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@x
+ }
+ \anchor{base}{
+ \left
+ \pgf@x=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@x
+ }
+ \anchor{S}{
+ \northeast
+ }
+ \anchor{source}{
+ \northeast
+ }
+ \anchor{D}{
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+ \anchor{drain}{
+ \northeast
+ \pgf@y=-\pgf@y
+ }
+}{%
+ \pgf@circuit@fet@ntypefalse
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{.4}{%
+ \pgfpoint%
+ {\pgf@circ@res@right}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \endpgfscope
+ \fi
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base height}\pgf@circ@res@down}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/base width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate height}\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+ \pgfpathcircle{\pgfpoint
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pmos/gate width}\pgf@circ@res@left - \pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}{\pgfkeysvalueof{/tikz/circuitikz/nodes width}*\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}}
+ \ifpgf@circuit@pmos@emptycircle
+ \pgfsetfillcolor{white}
+ \fi
+ \pgfusepath{draw,fill}
}
@@ -1706,6 +1664,7 @@
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate height}\pgf@circ@res@up}}
@@ -1767,18 +1726,19 @@
{\pgf@circ@res@up+\pgf@circ@res@down}%
}{%
\pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/base width}\pgf@circ@res@left}%
{\pgf@circ@res@up+\pgf@circ@res@down}%
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nfet/gate width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
@@ -1805,6 +1765,7 @@
}
}{%
+ \pgf@circuit@fet@ntypefalse
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate height}\pgf@circ@res@up}}
@@ -1871,19 +1832,20 @@
{\pgf@circ@res@up+\pgf@circ@res@down}%
}{%
\pgfpoint%
- {\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/base width}\pgf@circ@res@left}%
+ {\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/base width}\pgf@circ@res@left}%
{\pgf@circ@res@up+\pgf@circ@res@down}%
}
\pgftransformrotate{180}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pfet/gate width}\pgf@circ@res@left}
{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
@@ -1915,6 +1877,7 @@
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -1963,12 +1926,13 @@
\pgfusepath{draw}
% SOLDER DOT at source-bulk connection
+ \ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
-
+ \fi
% GATE
\pgfscope
\pgfpathmoveto{\pgfpoint
@@ -1998,14 +1962,19 @@
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
+
+
+
% N-CHANNEL IGFET ENHANCEMENT TYPE with Bulk connector
\pgfcircdeclarefet{nigfetebulk}{ %nur ohne strich zwischen Bulk und Source
\anchor{D}{
@@ -2033,6 +2002,7 @@
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2110,13 +2080,14 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
@@ -2149,6 +2120,7 @@
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2186,12 +2158,13 @@
% SOLDER DOT at source-bulk connection
+ \ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
-
+ \fi
% GATE
\pgfscope
\pgfpathmoveto{\pgfpoint
@@ -2220,7 +2193,7 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate width}\pgf@circ@res@left}
@@ -2228,6 +2201,7 @@
%\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfetd/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE
@@ -2257,6 +2231,7 @@
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@y
}
}{%
+\pgf@circuit@fet@ntypefalse
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2311,12 +2286,13 @@
% SOLDER DOT at source-bulk connection
+ \ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope
-
+ \fi
% GATE
\pgfscope
\pgfpathmoveto{\pgfpoint
@@ -2347,7 +2323,7 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION (in line with source)
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate width}\pgf@circ@res@left}
@@ -2355,6 +2331,7 @@
%\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfete/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
% P-CHANNEL IGFET ENHANCEMENT TYPE with bulk connector
@@ -2384,6 +2361,7 @@
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypefalse
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2468,7 +2446,7 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION (in line with source)
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate width}\pgf@circ@res@left}
@@ -2476,6 +2454,7 @@
%\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetebulk/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
@@ -2506,6 +2485,7 @@
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypefalse
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2552,12 +2532,13 @@
% SOLDER DOT at source-bulk connection
+ \ifpgf@circuit@fet@solderdot
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
-
+ \fi
% GATE
\pgfscope
\pgfpathmoveto{\pgfpoint
@@ -2588,7 +2569,7 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
+ \ifpgf@circuit@bpt@drawgate
% GATE CONNECTION
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate width}\pgf@circ@res@left}
@@ -2596,6 +2577,7 @@
%\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pigfetd/gate height}\pgf@circ@res@down}}
\pgfusepath{draw}
+ \fi
}
@@ -2604,12 +2586,7 @@
%% Contrib Danilo Piazzalunga
-
-
-
-
-
-\pgfcircdeclaretransistor{njfet}{
+\pgfcircdeclarefet{njfet}{
\anchor{G}{
\left
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
@@ -2639,6 +2616,7 @@
\pgf@y=-\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@up}}
@@ -2679,8 +2657,7 @@
}
\pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
\endpgfscope
-
-
+
\pgfpathmoveto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/njfet/gate height 2}\pgf@circ@res@down}}
@@ -2690,7 +2667,7 @@
}
-\pgfcircdeclaretransistor{pjfet}{
+\pgfcircdeclarefet{pjfet}{
\anchor{G}{
\left
\pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
@@ -2720,6 +2697,7 @@
\pgf@y=-\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypefalse
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/pjfet/gate height 2}\pgf@circ@res@up}}
@@ -2802,6 +2780,7 @@
\pgf@y=-\pgf@y
}
}{%
+ \pgf@circuit@fet@ntypetrue
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
% DRAIN CONNECTION
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
@@ -2856,12 +2835,13 @@
% SOLDER DOT at source-bulk connection
- \pgfscope
- \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
- \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
- \pgfnode{circ}{center}{}{}{}
- \endpgfscope{}
-
+ \ifpgf@circuit@fet@solderdot
+ \pgfscope
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
+ \pgfkeysvalueof{/tikz/circuitikz/tripoles/nigfete/gate height}\pgf@circ@res@down}}
+ \pgfnode{circ}{center}{}{}{}
+ \endpgfscope{}
+ \fi
% ARROW
\pgfscope
\pgfslopedattimetrue
@@ -2907,18 +2887,6 @@
}
-
-
-
-
-
-
-
-
-
-
-
-
%% Black thyristor
\pgfcircdeclarebipole{
@@ -3307,7 +3275,7 @@
\pgfpathlineto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}}
- \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}]{\ $-$}
+ \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@up}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $-$}
\pgfpathmoveto{\pgfpoint
@@ -3316,7 +3284,7 @@
\pgfpathlineto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}}
- \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}]{\ $+$}
+ \pgftext[left, at=\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/port width}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/gm amp/input height}\pgf@circ@res@down}]{\pgfkeysvalueof{/tikz/circuitikz/tripoles/op amp/font} $+$}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint{.3\pgf@circ@res@right}{0pt}} %
@@ -3420,16 +3388,406 @@
}
-\pgfdeclareshape{circulator}
+\pgfdeclareshape{mixer}
{
\savedanchor\northwest{
- \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
- \pgf@y=.5\pgf@y
- \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
- \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
+ \ifpgf@circuit@boxed
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \else
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/mixer/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{left}{%
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{3}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{4}{
+ \northwest
+ \pgf@y=\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{in 1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in 2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{in2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{center}{
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+ \pgf@circ@res@step=\ctikzvalof{tripoles/mixer/width}\pgf@circ@Rlen
+
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+
+ % draw outer box
+ \ifpgf@circuit@boxed
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
+
+ % draw outer circle
+ \ifpgf@circuit@boxed
+ \pgf@circ@res@step=.7\pgf@circ@res@step
+ \pgfsetdash{}{0pt} % draw solid circle if boxed
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
+ \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
+ \pgfusepath{draw}
+
+ % draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetlinewidth{\pgfstartlinewidth}
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathmoveto{\pgfpointpolar{135}{0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpointpolar{-45}{0.5\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathmoveto{\pgfpointpolar{45}{0.5\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpointpolar{-135}{0.5\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \endpgfscope
+ }
+}
+
+\pgfdeclareshape{adder}
+{
+ \savedanchor\northwest{
+ \ifpgf@circuit@boxed
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \else
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/adder/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{left}{%
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{3}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{4}{
+ \northwest
+ \pgf@y=\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{in 1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in1}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{in 2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{in2}{
+ \northwest
+ \pgf@y=-\pgf@y
+ \pgf@x=0pt
+ }
+ \anchor{out}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{center}{
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{south west}{
+ \northwest
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+ \pgf@circ@res@step=\ctikzvalof{tripoles/adder/width}\pgf@circ@Rlen
+
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+
+ % draw outer box
+ \ifpgf@circuit@boxed
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
+
+ % draw outer circle
+ \ifpgf@circuit@boxed
+ \pgf@circ@res@step=.7\pgf@circ@res@step{}
+ \pgfsetdash{}{0pt} % draw solid circle if boxed
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
+ \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
+ \pgfusepath{draw}
+
+ % draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathmoveto{\pgfpointpolar{0}{0.3\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpointpolar{180}{0.3\pgf@circ@res@step}}
+ \pgfpathmoveto{\pgfpointorigin}
+ \pgfpathmoveto{\pgfpointpolar{90}{0.3\pgf@circ@res@step}}
+ \pgfpathlineto{\pgfpointpolar{270}{0.3\pgf@circ@res@step}}
+ \pgfsetlinewidth{2\pgflinewidth}
+ \pgfusepath{draw}
+
+ \endpgfscope
+ }
+}
+
+\pgfdeclareshape{oscillator}
+{
+ \savedanchor\northwest{
+ \ifpgf@circuit@boxed
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \else
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/oscillator/width}\pgf@x
+ \fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{north}{
+ \northwest
\pgf@x=.5\pgf@x
}
+ \anchor{south}{
+ \northwest
+ \pgf@x=.5\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{text}{
+ \pgf@x=-2\pgf@x
+ \advance \pgf@x by -.5\wd\pgfnodeparttextbox
+ \advance \pgf@y by -1.5\ht\pgfnodeparttextbox
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+
+ \pgf@circ@res@step=\ctikzvalof{tripoles/oscillator/width}\pgf@circ@Rlen{}
+
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+
+ \pgftransformxshift{-0.5\pgf@circ@res@step} % The oscillator is shifted to the left, so a connection comes out of the anchor "east"
+
+ % draw outer box
+ \ifpgf@circuit@boxed{}
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
+
+ % draw outer circle
+ \ifpgf@circuit@boxed
+ \pgf@circ@res@step=.7\pgf@circ@res@step{}
+ \pgfsetdash{}{0pt} % draw solid circle if boxed
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
+ \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
+ \pgfusepath{draw}
+
+ % draw inner sine waves
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetlinewidth{\pgfstartlinewidth}
+
+ \pgfpathmoveto{\pgfpoint{-0.3\pgf@circ@res@step}{0\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.15\pgf@circ@res@step}{-.15\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.15\pgf@circ@res@step}{.15\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \endpgfscope
+ }
+}
+
+\pgfdeclareshape{circulator}
+{
+ \savedanchor\northwest{
+ \ifpgf@circuit@boxed
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \else
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/circulator/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ \fi
+ }
\anchor{center}{
\pgfpointorigin
}
@@ -3440,7 +3798,7 @@
\anchor{1}{
\northwest
\pgf@y=0pt
- }
+ }
\anchor{2}{
\northwest
\pgf@y=0pt
@@ -3493,19 +3851,31 @@
\pgfscope
\pgfstartlinewidth=\pgflinewidth
+ % draw outer box
+ \ifpgf@circuit@boxed
+ \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ \fi
+
% draw outer circle
- \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \ifpgf@circuit@boxed{}
+ \pgf@circ@res@step=.7\pgf@circ@res@step{}
+ \pgfsetdash{}{0pt} % draw solid circle if boxed
+ \else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ \fi
\pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
\pgfusepath{draw}
% inner arrow
\pgfsetdash{}{0pt} % always draw solid line for inner symbol
\pgfsetlinewidth{\pgfstartlinewidth}
+
\pgfsetarrowsend{latex}
\pgfpathmoveto{\pgfpoint{-0.25\pgf@circ@res@step}{0}}
\pgfpatharc{180}{-90} {0.25\pgf@circ@res@step}
\pgfpathlineto{\pgfpoint{-5pt}{-0.2\pgf@circ@res@step}}
\pgfusepath{draw}
+
\endpgfscope
}
}
@@ -3596,6 +3966,8 @@
\pgfusepath{draw}
% draw inner stuff
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ \pgfsetarrows{-} %never draw arrows
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
\pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
@@ -3635,5 +4007,108 @@
}
}
+% electromechanical device (motor/generator)
+\pgfdeclareshape{elmech}
+{
+ \savedanchor\northwest{
+ %\ifpgf@circuit@boxed
+ % \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ % \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@y
+ % \pgf@y=.5\pgf@y
+ % \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ % \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/bipoles/twoport/width}\pgf@x
+ % \pgf@x=.5\pgf@x
+ %\else
+ \pgf@y= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@y=\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/height}\pgf@y
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}
+ \pgf@x=-\pgfkeysvalueof{/tikz/circuitikz/tripoles/elmech/width}\pgf@x
+ \pgf@x=.5\pgf@x
+ %\fi
+ }
+ \anchor{center}{
+ \pgfpointorigin
+ }
+ \anchor{text}{
+ \pgfpointorigin
+ \advance \pgf@x by -.5\wd\pgfnodeparttextbox
+ \advance \pgf@y by -.5\ht\pgfnodeparttextbox
+ }
+ \anchor{left}{%
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{right}{%
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{top}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{pathstart}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \anchor{pathend}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{bottom}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{center}{
+ \pgf@y=0pt
+ \pgf@x=0pt
+ }
+ \anchor{east}{
+ \northwest
+ \pgf@y=0pt
+ \pgf@x=-\pgf@x
+ }
+ \anchor{west}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{south}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=-\pgf@y
+ }
+ \anchor{north}{
+ \northwest
+ \pgf@x=0pt
+ }
+ \backgroundpath{
+ \pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/color}}
+ \pgf@circ@res@step=\ctikzvalof{tripoles/elmech/width}\pgf@circ@Rlen
+ \pgf@circ@res@up=\ctikzvalof{tripoles/elmech/height}\pgf@circ@Rlen
+ \pgfscope
+ \pgfstartlinewidth=\pgflinewidth
+ % draw outer box
+ % \ifpgf@circuit@boxed
+ % \pgfnode{box}{center}{}{pgf@box}{\pgfusepath{draw}}
+ % \fi
+ % draw outer circle
+ %\ifpgf@circuit@boxed
+ % \pgf@circ@res@step=.7\pgf@circ@res@step
+ % \pgfsetdash{}{0pt} % draw solid circle if boxed
+ %\else
+ \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}\pgfstartlinewidth}
+ %\fi
+ \pgfpathrectangle{\pgfpoint{-.25\pgf@circ@res@step}{-.5\pgf@circ@res@up}}{\pgfpoint{.5\pgf@circ@res@step}{\pgf@circ@res@up}}
+ \pgfsetfillcolor{black}
+ \pgfusepath{draw,fill}
+ \pgfpathcircle{\pgfpoint{0}{0}} {0.5\pgf@circ@res@step}
+ \pgfsetfillcolor{white}
+ \pgfusepath{draw,fill}
+ \endpgfscope
+ }
+}
\endinput