[pstricks] Using \nccurve with Postscript coordinates inside \pscustom
Christoph Bersch
usenet at bersch.net
Wed Dec 14 11:19:20 CET 2011
Hi,
On 30.11.2011 20:24, Herbert Voss wrote:
> Am 30.11.2011 16:16, schrieb Christoph Bersch:
>
>> I want to use \nccurve with Postscript coordinates inside \pscustom.
>> Using \pccurve does not work, because inside \pscustom no new nodes can
>> be defined with \pnode (as is done internally in \pccurve), the
>> following one does not draw any curve:
>>
>> \documentclass{article}
>> \usepackage{pst-node}
>> \begin{document}
>> \begin{pspicture}[showgrid=true]
>> \pscustom{\pccurve(! 1 1)(!3 3)}%
>> \end{pspicture}
>> \end{document
>>
>> This is a heavily simplified version of the original problem. There is
>> no way to define the nodes outside the \pscustom scope.
>>
>> Is there any viable solution for my problem?
>
> Maybe this helps:
[...]
> \moveto(0,0)
> \code{ tx at NodeDict begin {1 1 0.292 div exch 0.292 div exch neg
> } false /N at A 10 {InitPnode} /NodeScale {} def NewNode end }
> \code{ tx at NodeDict begin {10 10 0.292 div exch 0.292 div exch neg
> } false /N at B 10 {InitPnode} /NodeScale {} def NewNode end }
> \nccurve{A}{B}
yes, this approach seems to work fine for my case.
I tried it in a similar way, but I didn't have the correct scaling, and
for NewNode the currentpoint was missing (which is set by \moveto).
Thank you once more :-),
Christoph
More information about the PSTricks
mailing list