David Arnold wrote:
This works fine. However, what I need to do is somehow clip the path P to the bounding box, but retain the resulting cutpath in a path variable Q. That is, I need to cut off the parts of the path P that lie outside the bounding box cpath:=(-5,-5)--(5,-5)--(5,5)--(-5,5)--cycle and store the clipped path in the path variable Q. The difficulty is I have no advance knowledge if the path P lies entirely inside the bounding box or if it escapes through one of the sides.
it all depends on what you want to do further on; - you can do some cutbefore and cutafter trickery, i.e. determine intersectionpoints with the edges of the bbox and do some cutting - if you just want the path back .. just ask for "pathpart pic" Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------