答案1
更新:
应该从 1.4.6 开始修复,请参阅https://github.com/circuitikz/circuitikz/issues/604
解决方法
(但fill opacity
请注意,它坏了;上面的更新中已正确修复)
令人费解。在 TL 遗留形状的绘图中,有一个透明度组(我不记得为什么)似乎会造成混淆或与 交互不良overlay
。删除它可以解决当前的问题,但我必须对其进行更多研究。
\documentclass{article}
\usepackage{circuitikz}
\makeatletter
\pgfcircdeclarebipolescaled{RF}
{}
{\ctikzvalof{bipoles/tline/height}}
{tline}
{\ctikzvalof{bipoles/tline/height}}
{\ctikzvalof{bipoles/tline/width}}
{
\pgf@circ@res@step=.2\pgf@circ@res@right % half x axis
% \begin{pgftransparencygroup}
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@left+\pgf@circ@res@step}{\pgf@circ@res@up}}
\pgfpatharc{-90}{90}{-\pgf@circ@res@step and -\pgf@circ@res@up}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{\pgf@circ@res@down}}
\pgf@circ@draworfill
\pgfpathellipse{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0pt}}
{\pgfpoint{\pgf@circ@res@step}{0pt}}{\pgfpoint{0pt}{-\pgf@circ@res@up}}
\pgf@circ@draworfill
% \end{pgftransparencygroup}
\pgfsetlinewidth{\pgfstartlinewidth}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right-\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfusepath{stroke}
}
\makeatother
\begin{document}
\begin{circuitikz}
\draw (0,0) to [TL] (2,0) to[R] (4,0) to[generic] (6,0);
\end{circuitikz}
\begin{circuitikz} [overlay]
\draw (0,0) to [TL] (2,0) to[R] (4,0) to[generic] (6,0);
\end{circuitikz}
\end{document}