summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/circuitikz/tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-10-05 03:00:57 +0000
committerNorbert Preining <norbert@preining.info>2020-10-05 03:00:57 +0000
commit07723a50707217d2d397c098ec67af793cdfa916 (patch)
tree419906c34d6f422224cdb60740b38a7db16c57d4 /graphics/pgf/contrib/circuitikz/tex
parent62f3109ec0fcb4a3309966bdcb9e4f307ff35dd2 (diff)
CTAN sync 202010050300
Diffstat (limited to 'graphics/pgf/contrib/circuitikz/tex')
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex76
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex134
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex266
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex10
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex135
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex249
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
9 files changed, 874 insertions, 8 deletions
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index d3fa441ab7..3fdb137c4b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -12,8 +12,8 @@
\NeedsTeXFormat{LaTeX2e}
-\def\pgfcircversion{1.2.3}
-\def\pgfcircversiondate{2020/08/07}
+\def\pgfcircversion{1.2.4}
+\def\pgfcircversiondate{2020/10/04}
\ProvidesPackage{circuitikz}%
[\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion]
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index fe87271f5e..cf0e4ee28b 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -969,11 +969,27 @@
\ctikzset{bipoles/twoport/width/.initial=.7}
\ctikzset{bipoles/twoport/height/.initial=.7}
\ctikzset{bipoles/twoport/text/.initial=}
+\ctikzset{bipoles/twoportsplit/width/.initial=.7}
+\ctikzset{bipoles/twoport/text in/.initial=}
+\ctikzset{bipoles/twoport/text out/.initial=}
+\ctikzset{text/.style={t=#1}}
+\ctikzset{t/.code={%
+ \ctikzsetvalof{bipoles/twoport/text}{#1}%
+}}
+\ctikzset{text in/.style={t1=#1}}
+\ctikzset{t1/.code={%
+ \ctikzsetvalof{bipoles/twoport/text in}{#1}%
+}}
+\ctikzset{text out/.style={t2=#1}}
+\ctikzset{t2/.code={%
+ \ctikzsetvalof{bipoles/twoport/text out}{#1}%
+}}
\ctikzset{bipoles/vco/width/.initial=.7}
\ctikzset{bipoles/bandpass/width/.initial=.7}
\ctikzset{bipoles/bandstop/width/.initial=.7}
\ctikzset{bipoles/highpass/width/.initial=.7}
\ctikzset{bipoles/lowpass/width/.initial=.7}
+\ctikzset{bipoles/allpass/width/.initial=.7}
\ctikzset{bipoles/adc/width/.initial=.7}
\ctikzset{bipoles/dac/width/.initial=.7}
\ctikzset{bipoles/dsp/width/.initial=.7}
@@ -995,6 +1011,9 @@
\ctikzset{tripoles/wilkinson/height/.initial=1.3}
\ctikzset{tripoles/wilkinson/width/.initial=1.3}
+\ctikzset{tripoles/splitter/height/.initial=1.3}
+\ctikzset{tripoles/splitter/width/.initial=1.3}
+
\ctikzset{tripoles/mzm/height/.initial=1.3}
\ctikzset{tripoles/mzm/width/.initial=1.3}
%%>>>
@@ -1124,6 +1143,35 @@
\ctikzset{tripoles/pmos/bodydiode conn/.initial=.6}
\ctikzset{tripoles/pmos/curr direction/.initial=-1}
+\ctikzset{tripoles/nmosd/width/.initial=.7}
+\ctikzset{tripoles/nmosd/gate height/.initial=.35}
+\ctikzset{tripoles/nmosd/base height/.initial=.5}
+\ctikzset{tripoles/nmosd/conn height/.initial=0}
+\ctikzset{tripoles/nmosd/height/.initial=1.1}
+\ctikzset{tripoles/nmosd/base width/.initial=.5}
+\ctikzset{tripoles/nmosd/gate width/.initial=.62}
+\ctikzset{tripoles/nmosd/arrow pos/.initial=.6}
+\ctikzset{tripoles/nmosd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nmosd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nmosd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nmosd/curr direction/.initial=1}
+\ctikzset{tripoles/nmosd/depletion width/.initial=.1}
+\ctikzset{tripoles/nmosd/depletion color/.initial=default}
+
+\ctikzset{tripoles/pmosd/width/.initial=.7}
+\ctikzset{tripoles/pmosd/gate height/.initial=.35}
+\ctikzset{tripoles/pmosd/base height/.initial=.5}
+\ctikzset{tripoles/pmosd/conn height/.initial=0}
+\ctikzset{tripoles/pmosd/height/.initial=1.1}
+\ctikzset{tripoles/pmosd/base width/.initial=.5}
+\ctikzset{tripoles/pmosd/gate width/.initial=.62}
+\ctikzset{tripoles/pmosd/arrow pos/.initial=.4}
+\ctikzset{tripoles/pmosd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pmosd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pmosd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pmosd/curr direction/.initial=-1}
+\ctikzset{tripoles/pmosd/depletion width/.initial=.1}
+\ctikzset{tripoles/pmosd/depletion color/.initial=default}
\ctikzset{tripoles/hemt/width/.initial=.7}
\ctikzset{tripoles/hemt/gate height/.initial=.35}
\ctikzset{tripoles/hemt/base height/.initial=.5}
@@ -1160,6 +1208,30 @@
\ctikzset{tripoles/pfet/bodydiode conn/.initial=.6}
\ctikzset{tripoles/pfet/curr direction/.initial=-1}
+\ctikzset{tripoles/nfetd/width/.initial=.7}
+\ctikzset{tripoles/nfetd/gate height/.initial=.35}
+\ctikzset{tripoles/nfetd/base height/.initial=.5}
+\ctikzset{tripoles/nfetd/conn height/.initial=0}
+\ctikzset{tripoles/nfetd/height/.initial=1.1}
+\ctikzset{tripoles/nfetd/base width/.initial=.5}
+\ctikzset{tripoles/nfetd/gate width/.initial=.62}
+\ctikzset{tripoles/nfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/nfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/nfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/nfetd/curr direction/.initial=1}
+
+\ctikzset{tripoles/pfetd/width/.initial=.7}
+\ctikzset{tripoles/pfetd/gate height/.initial=.35}
+\ctikzset{tripoles/pfetd/base height/.initial=.5}
+\ctikzset{tripoles/pfetd/conn height/.initial=0}
+\ctikzset{tripoles/pfetd/height/.initial=1.1}
+\ctikzset{tripoles/pfetd/base width/.initial=.5}
+\ctikzset{tripoles/pfetd/gate width/.initial=.62}
+\ctikzset{tripoles/pfetd/bodydiode scale/.initial=.3}
+\ctikzset{tripoles/pfetd/bodydiode distance/.initial=.3}
+\ctikzset{tripoles/pfetd/bodydiode conn/.initial=.6}
+\ctikzset{tripoles/pfetd/curr direction/.initial=-1}
+
\ctikzset{tripoles/nigfete/width/.initial=.7}
\ctikzset{tripoles/nigfete/gate height/.initial=.35}
\ctikzset{tripoles/nigfete/base height/.initial=.5}
@@ -2159,6 +2231,10 @@
% american open voltage adjusting
%
\newif\ifpgf@adjust@open@voltage\pgf@adjust@open@voltagetrue
+\ctikzset{open voltage position/.is choice}
+\ctikzset{open voltage position/center/.code={\pgf@adjust@open@voltagetrue}}
+\ctikzset{open voltage position/legacy/.code={\pgf@adjust@open@voltagefalse}}
+% bad names, kept for compatibility, don't use
\ctikzset{american open voltage/.is choice}
\ctikzset{american open voltage/center/.code={\pgf@adjust@open@voltagetrue}}
\ctikzset{american open voltage/legacy/.code={\pgf@adjust@open@voltagefalse}}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index d9b8e7ca4d..7cd5baff47 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -4040,6 +4040,72 @@
}
+%% twoport split
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{twoportsplit}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{\ctikzvalof{bipoles/twoportsplit/width}}
+{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/twoportsplit/width}\pgf@circ@scaled@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
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ \ifpgf@circuit@inputarrow
+ {
+ \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+ }
+ \fi
+
+ %get texts
+ \def\pgfcirc@tin{\ctikzvalof{bipoles/twoport/text in}}
+ \def\pgfcirc@tout{\ctikzvalof{bipoles/twoport/text out}}
+
+ % rotate inner symbol
+ \def\texti{\pgfcirc@tin}
+ \def\textii{\pgfcirc@tout}
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \def\texti{\pgfcirc@tout}
+ \def\textii{\pgfcirc@tin}
+ \pgftransformrotate{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \def\texti{\pgfcirc@tout}
+ \def\textii{\pgfcirc@tin}
+ \pgftransformrotate{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 225 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \def\texti{\pgfcirc@tin}
+ \def\textii{\pgfcirc@tout}
+ \fi\fi
+
+ % 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}}
+ \pgfusepath{draw}
+
+ \pgftext[center,x=0.45\pgf@circ@res@left,y=0.45\pgf@circ@res@up]{\texti}
+ \pgftext[center,x=0.45\pgf@circ@res@right,y=0.45\pgf@circ@res@down]{\textii}
+}
+
%% voltage controled oscillator
\pgfcircdeclarebipolescaled{blocks}
{}
@@ -4389,6 +4455,74 @@
\pgfusepath{draw}
}
+%% allpass filter
+\pgfcircdeclarebipolescaled{blocks}
+{}
+{\ctikzvalof{bipoles/allpass/width}}
+{allpass}
+{\ctikzvalof{bipoles/allpass/width}}
+{\ctikzvalof{bipoles/allpass/width}}
+{
+ \pgf@circ@res@step = \ctikzvalof{bipoles/allpass/width}\pgf@circ@scaled@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
+
+ \ifpgf@circuit@dashed
+ \pgfsetdash{{0.1cm}{0.1cm}}{0cm}
+ \fi
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ \ifpgf@circuit@inputarrow
+ {
+ \advance \pgf@circ@res@left by -.5\ctikzvalof{bipoles/thickness}\pgfstartlinewidth
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfnode{inputarrow}{tip}{}{pgf@inputarrow}{\pgfusepath{fill}}
+ }
+ \fi
+
+ % rotate inner symbol
+ \def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
+ \ifnum \pgfcircmathresult > 45 \ifnum \pgfcircmathresult < 135
+ \pgftransformrotate{270}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 134 \ifnum \pgfcircmathresult < 225 % 134 degree, because >= 135 is not possible
+ \pgftransformrotate{180}
+ \fi\fi
+ \ifnum \pgfcircmathresult > 224 \ifnum \pgfcircmathresult < 315
+ \pgftransformrotate{90}
+ \fi\fi
+
+ % 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}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \pgfpathmoveto{\pgfpoint{-0.5\pgf@circ@res@step}{0}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+
+ \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}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathsine{\pgfpoint{.25\pgf@circ@res@step}{-.25\pgf@circ@res@step}}
+ \pgfpathcosine{\pgfpoint{.25\pgf@circ@res@step}{.25\pgf@circ@res@step}}
+ \pgfusepath{draw}
+}
+
%% ADC
\pgfcircdeclarebipolescaled{blocks}
{}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
index 2c4407045c..a83279ee8c 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirclabel.tex
@@ -297,10 +297,6 @@
\fi%
}
-\ctikzset{text/.style={t=#1}}
-\ctikzset{t/.code={%
- \ctikzsetvalof{bipoles/twoport/text}{#1}%
-}}
%%%% Stacked labels
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
index ad7b791397..315ba32e4e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
@@ -2758,4 +2758,270 @@
}
}
+%%%% Transmission gates
+% tgates are only ieee style for now
+\tikzset{%
+ tgate/.style ={shape=ieee tgate},
+ double tgate/.style ={shape=ieee double tgate},
+}
+\ctikzset{tgate scale/.initial=0.7}
+% Buffer and inverters
+%
+% #1: name
+% #2: 1: one-not, 2:double-not
+% #3: content
+\long\def\pgfcircdeclareieeetgate#1#2#3{%
+ \pgfdeclareshape{ieee #1}%
+ {%
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{logic ports}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedmacro{\thisshape}{\def\thisshape{\tikz@fig@name}}
+ \saveddimen{\baselen}{%
+ \pgf@circ@ieeestd@baselen\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\stdH}{% This is HALF the height of the inner port
+ \pgf@circ@ieeestd@stdH\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\notdiameter}{
+ \pgf@circ@notradius\pgf@x=2\pgf@circ@res@temp
+ }
+ \saveddimen{\notradius}{
+ \pgf@circ@notradius\pgf@x=\pgf@circ@res@temp
+ }
+ \saveddimen{\pinlen}{%
+ \pgf@circ@ieeestd@pinlen\pgf@x=\pgf@circ@res@temp
+ }
+ % anchors for the body (no pins included here)
+ % Notice that 0.8660254 is cos(30)
+ \savedanchor{\bodyleft}{% This DOES NOT take into account the pointy or/xor thing
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\topleft}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\bodyright}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\bottomright}{% Here it is the same as \bodyright
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ % geographical anchors --- must be rectangulars!
+ \savedanchor{\northwest}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\southwest}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{-2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{-#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\southeast}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{-#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \savedanchor{\northeast}{%
+ \pgf@circ@ieeestd@stdH
+ \pgfmathsetlength{\pgf@x}{2*0.8660254*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ \pgfmathsetlength{\pgf@y}{#2*\pgf@circ@res@temp*\ctikzvalof{tgate scale}}
+ }
+ \anchor{center}{\pgfpointorigin}
+ \anchor{text}{
+ \ifpgf@circ@center@text
+ \pgfpoint{-.5\wd\pgfnodeparttextbox}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}
+ \else
+ \pgf@circ@ieeestd@stdH
+ \pgfpoint{-0.8660254*\pgf@circ@res@temp + \ctikzvalof{left text distance}}{\dimexpr.5\dp\pgfnodeparttextbox-.5\ht\pgfnodeparttextbox}
+ \fi
+ }
+ % input anchors
+ \anchor{in}{\bodyleft\pgf@y=0pt\advance\pgf@x by-\pinlen}
+ \anchor{in 1}{\bodyleft\pgf@y=0pt\advance\pgf@x by-\pinlen}
+ \anchor{bin}{\bodyleft\pgf@y=0pt\relax}
+ \anchor{bin 1}{\bodyleft\pgf@y=0pt\relax}
+ % gates
+ \anchor{gate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{-(#2-1)*0.5*\pgf@circ@res@up-\pinlen}}
+ \anchor{bgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{-(#2-1)*0.5*\pgf@circ@res@up}}
+ % gate (up) (2.1547 = 1+1/cos(30)
+ \anchor{notgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\relax
+ \pgfmathsetlength{\pgf@circ@res@temp}{2.1547*\notradius}
+ \ifdim\pinlen>\pgf@circ@res@temp
+ \pgfmathsetlength{\pgf@y}{(#2-1)*0.5*\pgf@circ@res@up+\pinlen}
+ \else
+ \pgf@y=\pgf@circ@res@temp
+ \fi
+ }
+ \anchor{bnotgate}{\bodyleft\pgf@circ@res@up=\pgf@y
+ \pgf@x=0pt\pgfmathsetlength{\pgf@y}{(#2-1)*0.5*\pgf@circ@res@up+2.1547*\notradius}}
+
+ % output anchors
+ \anchor{out}{%
+ \pgfextractx{\pgf@circ@res@other}{\bodyright} %body border, without not ball
+ \advance\pgf@circ@res@other by\pinlen
+ \pgfextractx{\pgf@circ@res@temp}{\bottomright} %body + ball border
+ \ifdim \pgf@circ@res@temp > \pgf@circ@res@other
+ \pgf@circ@res@other = \pgf@circ@res@temp % do not enter in the ball...
+ \fi
+ \pgf@x=\pgf@circ@res@other\pgf@y=0pt
+ }
+ \anchor{bout}{\bottomright\pgf@y=0pt}
+
+ \anchor{body right}{\bodyright\pgf@y=0pt}
+ \anchor{right}{\bottomright\pgf@y=0pt}
+ \anchor{body left}{\bodyleft\pgf@y=0pt}% central edge of the body
+ \anchor{left}{\bodyleft\pgf@y=0pt}
+ \anchor{up}{%
+ \bodyleft
+ \pgf@x=0pt
+ \ifnum#2=1\relax
+ \pgf@y=0pt
+ \else
+ \pgf@y=.5\pgf@y
+ \fi
+ \advance\pgf@y by \notdiameter
+ }
+ \anchor{down}{%
+ \bodyleft
+ \pgf@x=0pt
+ \ifnum#2=1\relax
+ \pgf@y=0pt
+ \else
+ \pgf@y=-.5\pgf@y
+ \fi
+ }
+ % this is for when it's used as a bipole
+ % we use the enclosing rectangle (see below)
+ \anchorborder{%
+ %
+ % this is the square border to position the path label with a bit of horizontal space
+ %
+ \pgf@xa=\pgf@x
+ \pgf@ya=\pgf@y
+ \pgfextracty{\pgf@circ@res@up}{\bodyleft}
+ \pgfextractx{\pgf@circ@res@left}{\bodyleft}
+ \pgfpointborderrectangle{\pgfpoint{\pgf@xa}{\pgf@ya}}
+ {\pgfpoint{-\pgf@circ@res@left}{\pgf@circ@res@up}}
+ }
+ % geographical anchors
+ \anchor{nw}{\northwest}
+ \anchor{ne}{\northeast}
+ \anchor{se}{\southeast}
+ \anchor{sw}{\southwest}
+ \anchor{north west}{\northwest}
+ \anchor{north east}{\northeast}
+ \anchor{south east}{\southeast}
+ \anchor{south west}{\southwest}
+ % over 0,0 even if asymmetric
+ % will break if the geocoords are not rectangular
+ \anchor{n}{\northwest\pgf@x=0pt\relax}
+ \anchor{e}{\northeast\pgf@y=0pt\relax}
+ \anchor{s}{\southwest\pgf@x=0pt\relax}
+ \anchor{w}{\northwest\pgf@y=0pt\relax}
+ \anchor{north}{\northwest\pgf@x=0pt\relax}
+ \anchor{east}{\northeast\pgf@y=0pt\relax}
+ \anchor{south}{\southwest\pgf@x=0pt\relax}
+ \anchor{west}{\northwest\pgf@y=0pt\relax}
+
+ \backgroundpath{
+ \pgfscope
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgfextractx{\pgf@circ@res@left}{\bodyleft}
+ \pgfextracty{\pgf@circ@res@up}{\bodyleft}
+ \pgfextractx{\pgf@circ@res@right}{\bodyright}
+ % \draw input pins
+ \ifpgfcirc@draw@input@leads
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pinlen}{0pt}}
+ % gate (down)
+ \pgfpathmoveto{\pgfpoint{0pt}{-(#2-1)*0.5*\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-(#2-1)*0.5*\pgf@circ@res@up-\pinlen}}
+ % gate (up) (2.1547 = 1+1/cos(30)
+ \pgfmathsetlength{\pgf@circ@res@temp}{2.1547*\notradius}
+ \ifdim\pinlen>\pgf@circ@res@temp
+ \pgfpathmoveto{\pgfpoint{0pt}{(#2-1)*0.5*\pgf@circ@res@up+\pgf@circ@res@temp}}
+ \pgfpathlineto{\pgfpoint{0pt}{(#2-1)*0.5*\pgf@circ@res@up+\pinlen}}
+ \fi
+ \pgfusepath{draw}
+ \fi
+ #3
+ \endpgfscope
+ % output lead:
+ \pgfextractx{\pgf@circ@res@right}{\bottomright} %body+ball border
+ \pgfextractx{\pgf@circ@res@other}{\bodyright} %body border, without "not" ball
+ \advance\pgf@circ@res@other by \pinlen\relax
+ \ifdim \pgf@circ@res@other > \pgf@circ@res@right
+ \ifpgfcirc@draw@output@leads
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{0pt}}
+ \pgfusepath{draw}
+ \fi
+ \fi
+ }
+ }
+}
+
+\pgfcircdeclareieeetgate{tgate}{1}{%
+ \pgfscope
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{0pt}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % 1.1547 is 1/cos(30)
+ \pgftransformshift{\pgfpoint{0pt}{1.1547*\notradius}}
+ \pgfnode{notcirc}{center}{}{\thisshape-not}{\pgfusepath{stroke}}
+ \endpgfscope
+}
+
+\pgfcircdeclareieeetgate{double tgate}{2}{%
+ \pgfscope
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ % bottom triangles
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{-\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0pt}{-.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
+ \pgfpathclose
+ \pgf@circ@draworfill
+ \endpgfscope
+ \pgfscope
+ % 1.1547 is 1/cos(30)
+ \pgftransformshift{\pgfpoint{0pt}{.5*\pgf@circ@res@up+1.1547*\notradius}}
+ \pgfnode{notcirc}{center}{}{\thisshape-not}{\pgfusepath{stroke}}
+ \endpgfscope
+}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
index 3f748f293d..e4926c9931 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircpath.tex
@@ -370,11 +370,13 @@
\def\pgf@circ@americangfsurgearrester@path#1{\pgf@circ@bipole@path{american gas filled surge arrester}{#1}}
\def\pgf@circ@twoport@path#1{\pgf@circ@bipole@path{twoport}{#1}}
+\def\pgf@circ@twoportsplit@path#1{\pgf@circ@bipole@path{twoportsplit}{#1}}
\def\pgf@circ@vco@path#1{\pgf@circ@bipole@path{vco}{#1}}
\def\pgf@circ@bandpass@path#1{\pgf@circ@bipole@path{bandpass}{#1}}
\def\pgf@circ@bandstop@path#1{\pgf@circ@bipole@path{bandstop}{#1}}
\def\pgf@circ@highpass@path#1{\pgf@circ@bipole@path{highpass}{#1}}
\def\pgf@circ@lowpass@path#1{\pgf@circ@bipole@path{lowpass}{#1}}
+\def\pgf@circ@allpass@path#1{\pgf@circ@bipole@path{allpass}{#1}}
\def\pgf@circ@adc@path#1{\pgf@circ@bipole@path{adc}{#1}}
\def\pgf@circ@dac@path#1{\pgf@circ@bipole@path{dac}{#1}}
\def\pgf@circ@dsp@path#1{\pgf@circ@bipole@path{dsp}{#1}}
@@ -501,11 +503,13 @@
\compattikzset{asymmetric fuse/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@afuse@path}}
\compattikzset{twoport/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoport@path}}
+\compattikzset{twoportsplit/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@twoportsplit@path}}
\compattikzset{vco/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@vco@path}}
\compattikzset{bandpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandpass@path}}
\compattikzset{bandstop/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@bandstop@path}}
\compattikzset{highpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@highpass@path}}
\compattikzset{lowpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@lowpass@path}}
+\compattikzset{allpass/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@allpass@path}}
\compattikzset{adc/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@adc@path}}
\compattikzset{dac/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dac@path}}
\compattikzset{dsp/.style = {\circuitikzbasekey, /tikz/to path=\pgf@circ@dsp@path}}
@@ -924,6 +928,8 @@
\pgf@circ@definetranspath{elmech}
\pgf@circ@definetranspath{nmos}
\pgf@circ@definetranspath{pmos}
+\pgf@circ@definetranspath{nmosd}
+\pgf@circ@definetranspath{pmosd}
\pgf@circ@definetranspath{hemt}
\pgf@circ@definetranspath{npn}
\pgf@circ@definetranspath{pnp}
@@ -957,3 +963,7 @@
\pgfcirc@port@node@to@path{buffer port}{inline buffer}
\pgfcirc@port@node@to@path{schmitt port}{inline schmitt}
\pgfcirc@port@node@to@path{invschmitt port}{inline invschmitt}
+
+\pgfcirc@port@node@to@path{tgate}{inline tgate}
+\pgfcirc@port@node@to@path{double tgate}{inline double tgate}
+
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
index d889f4ab0a..469f7aa8e4 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircquadpoles.tex
@@ -1271,6 +1271,141 @@
}
}
+%% resistive splitter
+\pgfdeclareshape{splitter}{
+ \savedmacro{\ctikzclass}{\edef\ctikzclass{blocks}}
+ \saveddimen{\scaledRlen}{\pgfmathsetlength{\pgf@x}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}}
+ \savedanchor\northwest{%
+ \pgfmathsetlength{\pgf@circ@scaled@Rlen}{\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen}
+ \pgf@y=\ctikzvalof{tripoles/wilkinson/height}\pgf@circ@scaled@Rlen
+ \pgf@y=.5\pgf@y
+ \pgf@x= \pgf@circ@scaled@Rlen
+ \pgf@x=.5\pgf@x
+ \pgf@x=-\ctikzvalof{tripoles/wilkinson/width}\pgf@x
+ }
+ \anchor{center}{
+ \northwest
+ \pgf@x=0pt
+ \pgf@y=0pt
+ }
+ \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{north east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ }
+ \anchor{north west}{
+ \northwest
+ }
+ \anchor{south east}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-\pgf@y
+ }
+ \anchor{in}{
+ \northwest
+ \pgf@y=0pt
+ }
+ \anchor{out1}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=-0.5\pgf@y
+ }
+ \anchor{out2}{
+ \northwest
+ \pgf@x=-\pgf@x
+ \pgf@y=0.5\pgf@y
+ }
+ \anchor{text}{
+ \northwest
+ \advance \pgf@y by 0.5\ht\pgfnodeparttextbox
+ \pgf@x=-.5\wd\pgfnodeparttextbox
+ }
+ \backgroundpath{
+ \pgfsetcolor{\ctikzvalof{color}}
+ \pgf@circ@scaled@Rlen=\scaledRlen
+
+ \northwest
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = -\pgf@x
+ \pgf@circ@res@left = \pgf@x
+
+ \pgfstartlinewidth=\pgflinewidth
+
+ % draw outer box
+ \pgf@circ@twoportbox
+
+ % 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}}
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@left}{0pt}}
+ \pgfpathmoveto{\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0.5\pgf@circ@res@down}}
+
+ \pgfusepath{draw}
+
+ \pgfsetdash{}{0pt} % always draw solid line for inner symbol
+ % draw inner resisitors - european or american style is recognised
+ \foreach \respt/\resang/\linepta/\lineptb in %
+ { \pgfpoint{0.5\pgf@circ@res@right}{0pt}/90/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}/\pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down},%
+ \pgfpoint{0}{0.25\pgf@circ@res@up}/25/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@up}/\pgfpoint{0.5\pgf@circ@res@left}{0},%
+ \pgfpoint{0}{0.25\pgf@circ@res@down}/-25/%
+ \pgfpoint{0.5\pgf@circ@res@right}{0.5\pgf@circ@res@down}/\pgfpoint{0.5\pgf@circ@res@left}{0}}
+ {
+ {
+ \pgftransformshift{\respt}
+ \pgftransformrotate{\resang}
+
+ % calculate size of resistor
+ \ifpgf@circuit@europeanresistor
+ \pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/generic/width} / 2}
+ \pgftransformscale{\pgfmathresult}
+ \pgfnode{genericshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
+ \else
+ \pgfmathparse{\pgf@circ@res@up / \pgf@circ@scaled@Rlen / \ctikzvalof{bipoles/resistor/width} / 2}
+ \pgftransformscale{\pgfmathresult}
+ \pgfnode{resistorshape}{center}{}{wilk@int@R}{\pgfusepath{fill}}
+ \fi
+ }
+
+ \pgfpathmoveto{\linepta}
+ \pgfpathlineto{\pgfpointanchor{wilk@int@R}{right}}
+
+ \pgfpathmoveto{\pgfpointanchor{wilk@int@R}{left}}
+ \pgfpathlineto{\lineptb}
+ \pgfusepath{draw}
+ }
+ }
+}
+
%% couplers generics
\long\def\pgfcircdeclarefourport#1#2{
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 9b1fd385c3..95f001618e 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -2642,6 +2642,246 @@
\fi
}
+%%% depletion MOSFET (simplified symbols)
+
+\long\def\pgfcirc@filldraw@depletion#1{%
+ \ifx\tikz@fillcolor\pgfutil@empty
+ % if there is no explicit fill check the specific key
+ \edef\@@tmp{\ctikzvalof{tripoles/#1/depletion color}}\edef\@@none{none}%
+ \ifx\@@tmp\@@none % if it's none
+ \pgfusepath{draw}%
+ \else
+ \edef\@@default{default}%
+ \ifx\@@tmp\@@default % fill with the pen color
+ \pgfusepath{draw, fill}%
+ \else
+ \pgfsetfillcolor{\@@tmp}%
+ \pgfusepath{draw, fill}%
+ \fi
+ \fi
+ \else
+ \pgfsetfillcolor{\tikz@fillcolor}%
+ \pgfusepath{draw, fill}%
+ \fi
+}
+
+\pgfcircdeclaretransistor{nmosd}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/nmosd/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/nmosd/gate height}\pgf@y
+ }
+ \anchor{nobulk}{ %override
+ \left
+ \pgf@circ@res@temp=\ctikzvalof{tripoles/nmosd/depletion width}\pgf@x
+ \pgf@x=\ctikzvalof{tripoles/nmosd/base width}\pgf@x
+ \advance\pgf@x by -\pgf@circ@res@temp
+ }
+ }{%
+ % draw depletion channel
+ \pgfscope
+ \pgfpathrectanglecorners
+ {\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ {\pgfpoint
+ {(\ctikzvalof{tripoles/nmosd/base width} - \ctikzvalof{tripoles/nmosd/depletion width})*\pgf@circ@res@left}
+ {-\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfcirc@filldraw@depletion{nmosd}
+ \endpgfscope
+ % draw drain and source terminals
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfusepath{draw}
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \ifpgf@circuit@trans@arrowatend
+ \pgftransformshift{\pgfpoint
+ {\pgf@circ@res@right}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{trarrow}{btip}{}{}{\pgfusepath{stroke}}
+ \else
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\ctikzvalof{tripoles/nmosd/arrow pos}}{%
+ \pgfpoint%
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}%
+ }{%
+ \pgfpoint
+ {\pgf@circ@res@right-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/nmosd/gate height}\pgf@circ@res@down}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \fi
+ \endpgfscope
+ \fi
+
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/nmosd/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+
+ \ifpgf@circuit@bpt@drawbulk % added by Burak Kelleci
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/nmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+}
+
+\pgfcircdeclaretransistor{pmosd}{
+ \anchor{inner up}{
+ \northeast
+ \pgf@y=\ctikzvalof{tripoles/pmosd/gate height}\pgf@y
+ }
+ \anchor{inner down}{
+ \northeast
+ \pgf@y=-\ctikzvalof{tripoles/pmosd/gate height}\pgf@y
+ }
+ \anchor{nobulk}{ %override
+ \left
+ \pgf@circ@res@temp=\ctikzvalof{tripoles/pmosd/depletion width}\pgf@x
+ \pgf@x=\ctikzvalof{tripoles/pmosd/base width}\pgf@x
+ \advance\pgf@x by -\pgf@circ@res@temp
+ }
+ }{%
+ % draw depletion channel
+ \pgfscope
+ \pgfpathrectanglecorners
+ {\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ {\pgfpoint
+ {(\ctikzvalof{tripoles/pmosd/base width} - \ctikzvalof{tripoles/pmosd/depletion width})*\pgf@circ@res@left}
+ {-\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfcirc@filldraw@depletion{pmosd}
+ \endpgfscope
+ \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfusepath{draw}
+
+ \ifpgf@circuit@mos@arrows
+ \pgfscope
+ \ifpgf@circuit@trans@arrowatend
+ \pgftransformshift{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }
+ \pgftransformrotate{180}
+ \pgfnode{trarrow}{tip}{}{}{\pgfusepath{stroke}}
+ \else
+ \pgfslopedattimetrue
+ \pgfallowupsidedownattimetrue
+ \pgfresetnontranslationattimefalse
+ \pgftransformlineattime{\ctikzvalof{tripoles/pmosd/arrow pos}}{%
+ \pgfpoint%
+ {\pgf@circ@res@right-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }{%
+ \pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}%
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}%
+ }
+ \pgfnode{currarrow}{center}{}{}{\pgfusepath{stroke}}
+ \fi
+ \endpgfscope
+ \fi
+
+ \pgfscope
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/base height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/base height}\pgf@circ@res@down}}
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
+ \pgfusepath{draw}
+ \endpgfscope
+
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/pmosd/gate height}\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
+
+
+ \pgfusepath{draw}
+ \ifpgf@circuit@bpt@drawgate
+ \pgfpathmoveto{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@left-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+
+ \ifpgf@circuit@bpt@drawbulk % added by Burak Kelleci
+ \pgfpathmoveto{\pgfpoint{\ctikzvalof{tripoles/pmosd/base width}\pgf@circ@res@left-\ctikzvalof{tripoles/nmosd/depletion width}*\pgf@circ@res@left}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfpathlineto{\pgfpoint{\pgf@circ@res@right+\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}
+ \pgfusepath{draw}
+ \fi
+
+ \ifpgf@circuit@pmos@nocircle\else
+ % we are not scaling the circle with the MOS --- I think it's better to have it
+ % coherent with the poles/nodes of the rest of the circuit.
+ \pgfpathcircle{\pgfpoint
+ {\ctikzvalof{tripoles/pmosd/gate width}\pgf@circ@res@left - \ctikzvalof{nodes width}*\pgf@circ@Rlen}
+ {\pgf@circ@res@up+\pgf@circ@res@down}}{\ctikzvalof{nodes width}*\pgf@circ@Rlen}
+ \ifpgf@circuit@pmos@emptycircle
+ \pgfsetfillcolor{white}
+ \fi
+ \pgfusepath{draw,fill}
+ \fi
+}
%% HEMT FET Transistor
\pgfcircdeclaretransistor{hemt}{
\anchor{inner up}{
@@ -2830,6 +3070,15 @@
\drawfetcore{pfet}
}
+\pgfdeclaretransistorwrapperaddbulk{nfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{nfetd}
+}
+
+\pgfdeclaretransistorwrapperaddbulk{pfetd}{}{%
+ \pgf@circuit@trans@depletiontypetrue
+ \drawfetcore{pfetd}
+}
% N-CHANNEL IGFET ENHANCEMENT TYPE
\pgfdeclaretransistorwrapperaddbulk{nigfete}{}{%
\pgf@circuit@trans@depletiontypefalse
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index 473dc34f43..1b45f630bd 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -10,8 +10,8 @@
%
% See the files gpl-3.0_license.txt and lppl-1-3c_license.txt for more details.
-\def\pgfcircversion{1.2.3}
-\def\pgfcircversiondate{2020/08/07}
+\def\pgfcircversion{1.2.4}
+\def\pgfcircversiondate{2020/10/04}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
\usemodule[tikz]