I have a path and I can use setdash. It works.
What I need to do is convert the dashes to be clipping path. I.e. the clipping path should be a series of boxes and arcs (path is curved).
strokepath
and clip
Eg:
%!
10 10 moveto
[3 3] 0 setdash
10 500 lineto
strokepath
clip
0 0 100 500 rectfill
showpage