Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!ginosko!uunet!mcsun!ukc!cam-cl!cet1 From: cet1@cl.cam.ac.uk (C.E. Thompson) Newsgroups: comp.lang.postscript Subject: Re: Test for nocurrentpoint Message-ID: <1238@scaup.cl.cam.ac.uk> Date: 10 Oct 89 20:06:19 GMT References: <3439@daimi.dk> Sender: news@cl.cam.ac.uk Reply-To: cet1@cl.cam.ac.uk (C.E. Thompson) Organization: U of Cambridge Comp Lab, UK Lines: 19 In article <3439@daimi.dk>, erja@daimi.dk (Erik Jacobsen) writes: > How can I test if there is no currentpoint, or the current path > is empty? I would like something like this: > > thereisacurrentpoint { pathbbox ..... } > { ..... } ifelse Nice question! The best I can come up with is /thereisacurrentpoint { mark false {cleartomark mark true} dup dup dup pathforall exch pop } def (Using the marks is just a way of being able to use the same procedure for all four arguments to 'pathforall'.) Chris Thompson JANET: cet1@uk.ac.cam.phx Internet: cet1%phx.cam.ac.uk@nsfnet-relay.ac.uk