我正在努力得到这个
但尽管我尝试过mirror
xscale=-1
yscale=-1
……
我还是无法得到预期的结果,为什么呢。
\documentclass{article}
\usepackage[american,cuteinductors,siunitx,smartlabels]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[rxantenna, xscale =-1]{} coordinate (Antenna)
to [short, *-] ++(0,1)
to [short, -*] ++(2,0) coordinate (C1)
to [vC, yscale=-1, *-] ++(0,-2)
(C1)
to [short] ++(2,0)
to[generic,n=S1] ++(0,-2)
to [short] ++(-2,0)
to [short] ++(-2,0)
to [short] (Antenna)
;
\speaker{S1}{0}
;
\end{circuitikz}
\end{document}
正如你所见,好像yscale
没有任何效果!
别误会我的意思,yscale=-1
事实上,正如你所看到的,我必须改变我的连接端-*
从*-
to [vC, yscale=-1, *-] ++(0,-2)
但箭头仍指向下方。
为什么?我该如何解决这个问题?
答案1
箭头始终从锚点指向in
。out
您可以通过反转绘制顺序来修复此问题。
\documentclass{article}
\usepackage[american,cuteinductors,siunitx,smartlabels]{circuitikz}
\newcommand{\speaker}[2] % #1 = name from to[generic,n=#1], #2 = rotation angle
{\draw[thick,rotate=#2] (#1) +(.2,.25) -- +(.7,.75) -- +(.7,-.75) -- +(.2,-.25);}
\begin{document}
\begin{circuitikz}
\draw (0,0) node[rxantenna, xscale =-1]{} coordinate (Antenna)
to [short, *-] ++(0,1)
to [short, -*] ++(2,0) coordinate (C1)
to [short] ++(2,0)
to[generic,n=S1] ++(0,-2)
to [short, -*] ++(-2,0) coordinate (C2)
to [short] ++(-2,0)
to [short] (Antenna)
(C2) to[vC] (C1);
\speaker{S1}{0}
;
\end{circuitikz}
\end{document}