CircuitTkZ:如何修改 nmos 符号?

CircuitTkZ:如何修改 nmos 符号?

我想得到以下 mosfet 符号(耗尽型 mosfet)。我认为可以通过修改标准 nmos(只有一条更宽的黑线)来实现,但不知道该怎么做。有人能帮我吗?谢谢!

耗尽型MOSFET

答案1

没有答案:

下面画一个nmos晶体管:

\pgfcircdeclaretransistor{nmos}{}{%
            \pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@up+\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
            \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/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-\pgfverticaltransformationadjustment*.5*\pgflinewidth}}
            \pgfusepath{draw}

            \pgfscope
            \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/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-\pgfhorizontaltransformationadjustment*.5*\pgflinewidth}{\pgf@circ@res@up+\pgf@circ@res@down}}
            \pgfusepath{draw}
        \fi
}

使用默认值

\ctikzset{tripoles/nmos/width/.initial=.7}
\ctikzset{tripoles/nmos/gate height/.initial=.35}
\ctikzset{tripoles/nmos/base height/.initial=.5}
\ctikzset{tripoles/nmos/conn height/.initial=0}
\ctikzset{tripoles/nmos/height/.initial=1.1}
\ctikzset{tripoles/nmos/base width/.initial=.5}
\ctikzset{tripoles/nmos/gate width/.initial=.62}

相关内容