Article View: comp.lang.postscript
Article #1175Re: Test for nocurrentpoint
From: C.E. Thompson
Date: Tue, 10 Oct 1989 20:06
Date: Tue, 10 Oct 1989 20:06
19 lines
1098 bytes
1098 bytes
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
Technical Details
Message-ID:
<1238@scaup.cl.cam.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!ginosko!uunet!mcsun!ukc!cam-cl!cet1References:
<3439@daimi.dk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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