[pstricks] Nodes and \rput

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun Mar 29 09:18:07 CEST 2009

Michael Sharpe schrieb:
> \rput doesn't seem to translate positions involving nodes. For example,
> \begin{pspicture}(6,6)
> \pnode(1,1){P}
> \rput(2,3){\psline(1,1)}% makes line from (2,3) to (3,4)
> \rput(2,3){\psline(P)}% makes line from (2,3) to (1,1)
> \end{pspicture}

see bug no 4. It cannot be resolved, because

> Is this something that can be changed by evaluating the expression in  
> another way? It doesn't seem to help to replace \psline(P) by  
> \psline(! \psGetNodeCenter{P} P.x P.y).

the argument of \rput works relative to the \rput coordinates,
but nodes are always handled with absolute coordinates.
However, we have PostScript and can provide a workaround :-)

\def\rputLine{\pst at object{rputLine}}
\def\rputLine at i(#1,#2)(#3){%
  \begin at SpecialObj
  \psline[linecolor=blue](#1,#2)(!\psGetNodeCenter{P} P.x #1 add P.y #2
add )
  \end at SpecialObj}




hope, it helps


More information about the PSTricks mailing list