%! /intersection { 1 dict begin /L exch def /A L 0 get def /B L 1 get def /C L 2 get def /f00 A -1 mul B -1 mul add C add def /f10 A 1 mul B -1 mul add C add def /f11 A 1 mul B 1 mul add C add def /f01 A 1 mul B -1 mul add C add def [ ] end } def % --- sample usage --------------------------------------- /S 72 def S dup scale 1 S div setlinewidth 4.25 5.5 translate newpath -1 -1 moveto 1 -1 lineto 1 1 lineto -1 1 lineto closepath stroke /I [1 1 1] intersection def I length 2 eq { newpath I 0 get 0 get I 0 get 1 get moveto I 1 get 0 get I 1 get 1 get lineto stroke } if