🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3143

Re: Imageable area of printer

#3143
From: Peter Davis
Date: Thu, 20 Sep 1990 20:56
49 lines
1761 bytes
In article <1990Sep12.105456.18945@siesoft.co.uk>, crs@oxygen.siesoft.co.uk (Chris Smith) writes...
>I have a program that is required to work on two different makes of
>PostScript printer with different imageable areas.  How do I write
>it so that it can cope with this?
> 
>Example:
> 
>I want to draw a vertical line in the middle of the imageable area.
> 
>If I don't know what the maximum and minimum values of the x-axis are
>how can I position the line in the middle of them?
> 
>--
>===========================================================================
>Chris Smith				...!mcvax!ukc!siesoft!crs
>					   <crs@siesoft.co.uk>
>===========================================================================

The easiest thing to do is find the default clippath for the device, and use
that.  Do this before you do anything else that might affect the clippath.

Here's an example:

%!
clippath
{
  /miny exch def
  /minx exch def
  /maxy miny def
  /maxx minx def
}
{
  /y exch def
  /x exch def
  y miny lt {/miny y def} if
  x minx lt {/minx x def} if
  y maxy gt {/maxy y def} if
  x maxx gt {/maxx x def} if
}
{
}
{
}
pathforall
minx maxx add 2 div miny moveto
0 maxy miny sub rlineto
stroke
showpage
Technical Details
Message-ID: <1691@shodha.enet.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!elroy.jpl.nasa.gov!ucla-cs!rutgers!mcnc!decvax.dec.com!bacchus.pa.dec.com!shlump.nac.dec.com!shodha.enet.dec.com!epik.enet.dec.com!p_davis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!elroy.jpl.nasa.gov!ucla-cs!rutgers!mcnc!decvax.dec.com!bacchus.pa.dec.com!shlump.nac.dec.com!shodha.enet.dec.com!epik.enet.dec.com!p_davis
From: p_davis@epik.enet.dec.com (Peter Davis)
Newsgroups: comp.lang.postscript
Subject: Re: Imageable area of printer
Message-ID: <1691@shodha.enet.dec.com>
Date: 20 Sep 90 20:56:59 GMT
Sender: news@shodha.enet.dec.com
Organization: Digital Equipment Corporation
Lines: 49