[pstricks] perpendicular line similar to \Parallel (pst-optic)

Patrick Drechsler patrick.drechsler at gmx.net
Sat Oct 23 22:11:13 CEST 2004


Hi Herbert!

Herbert Voss wrote on 23 Oct 2004 20:47:20 MET:

> Patrick Drechsler wrote:
>
>> 1) The node output of your macro being created by
>>    `\psperpendicularLine' is not correct (main problem).

The main problem isn't solved yet (screenshot?[1]).

>> 2) If `xunit' and `yunit' are not the same the result changes
>>    (obviously... -- I don't even have the time to understand and
>>    study your definition of \psperpendicularLine...)
>
> \makeatletter
> \def\psperpendicularLine{\pst at object{psperpendicularLine}}
> \def\psperpendicularLine at i(#1)(#2)#3#4{{
>     \use at par
>     \pnode(!
>     tx at NodeDict begin
>       /N@#1 load GetCenter
>       \pst at number\psyunit div /YA exch def
>       \pst at number\psxunit div /XA exch def
>       /N@#2 load GetCenter
>       \pst at number\psyunit div /YB exch def
>       \pst at number\psxunit div /XB exch def
>       YB YA sub #3 mul neg \pst at number\psyunit \pst at number\psxunit div 
> mul XA add
>       XB XA sub #3 mul \pst at number\psxunit \pst at number\psyunit div mul 
> YA add
>     end){#4}%
>     \psline(#1)(#4)
>   }\ignorespaces}
> \makeatother

Thanks, that solves the problem concercning scaling (I wish I had
time to take a vacation _and_ learn some postscript)!

Gruss

Patrick

Footnotes: 
[1] if needed: I don't have a homepage. I'm not sure if I can
send binaries to the list. Should I send you a binary via PM?

-- 
Do you remember when you only had to pay
for windows when *you* broke them?




More information about the PSTricks mailing list