I am using pst-circ to draw a circuit. For this I want to draw a voltmeter, so I use newCircDipole
to define a new element (MWE):
\documentclass{standalone}
\usepackage{pst-circ}
\newCircDipole{pscircmeter}
\makeatletter
\def\pst@draw@pscircmeter{%
\pnode(-0.3,0){dipole@1}
\pnode(0.3,0){dipole@2}
\psline[fillstyle=none,linewidth=1.5\pslinewidth,arrowinset=0]{->}%
(-0.4,-0.4)(0.45,0.45)
\pscircle[linewidth=1.5\pslinewidth,fillstyle=solid](0,0){0.3}
}
\makeatother
\def\voltmeter{\pscircmeter[labeloffset=0]}
\begin{document}
\begin{pspicture}[showgrid=false](-1,-1)(1,1)
\pnodes(0,-1){A}(0,1){B}
\voltmeter(B)(A){V}
\end{pspicture}
\end{document}
and then use it as \voltmeter(A)(B){V}
. Clearly I am going for this:
My question is about rotating this construct. If the nodes A and B are on top of each other, the pscircmeter
gets rotated with the arrow, see the MWE above. However, I want to retain the direction of the arrow (down-left to top-right) similar to the correct alignment of the text label (up).
I realise there might be cases where the wire and the arrow align, but I am willing to risk that.
While we are at it: Is it possible to change the default label to V
so that I can use it as \voltmeter(A)(B){}
an still get the V
printed?