diff options
author | Karl Berry <karl@freefriends.org> | 2020-10-04 21:12:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-10-04 21:12:32 +0000 |
commit | 3fcdb5a14db8eebe5e1441ac3e9035ab93303380 (patch) | |
tree | f4474a0b55aa38d7c9f67546bf62039afad2a5be /Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex | |
parent | 897efa4b7afe155a5913e31e318891bba54dd1bb (diff) |
circuitikz (4oct20)
git-svn-id: svn://tug.org/texlive/trunk@56536 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex | 249 |
1 files changed, 249 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex b/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex index 9b1fd385c31..95f001618e2 100644 --- a/Master/texmf-dist/tex/generic/circuitikz/pgfcirctripoles.tex +++ b/Master/texmf-dist/tex/generic/circuitikz/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 |