%! /intersection { 1 dict begin pop [[-1 -1][0 1]] 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