🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #186

Re: Drivers gifmono, pcxmono PROBLEM

#186
From: Dan Barooshian
Date: Wed, 05 Aug 1992 06:20
28 lines
1714 bytes
In some applications that start Ghostscript 2.4.1, we simply use the 
-g switch to set the size of the device. When dealing with EPS files,
however, we replace the %%BoundingBox with the following code that
sets the size of the output device. 

The first four numbers are the BoundingBox values supplied in the comment.
So, compute width and height in pixels by dividing the current resolution 
by the number of points (72). Then set up clipping and translate approp.


0 0 426 169  % BOUNDING BOX VALUES 
/ymax exch def /xmax exch def /y exch def /x exch def
/height ymax y sub def /width  xmax x sub def
/xpixels width 72 div gscurrentresolution 0 get mul round def
/ypixels height 72 div gscurrentresolution 1 get mul round def
mark /HWSize [ xpixels cvi ypixels cvi ] currentdevice putdeviceprops setdevice
newpath
x neg y neg translate
x y moveto width 0 rlineto 0 height rlineto width neg 0 rlineto 0 height neg rlineto
clip newpath

This is my contribution. Other users who have comments on this method
are asked to make them.

--------------------------------------------------------------------------
Danny Barooshian      UUNET    : uunet!xyvi!danb
Xyvision, Inc.        INTERNET : xyvi!danb@uunet.uu.net 
Wakefield,MA          PHONE    : 617/245-4100 x5301
Technical Details
Message-ID: <9208051710.AA21645@relay1.UU.NET>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!xyvi.UUCP!danb

Show Full Headers
Complete Article Headers
Newsgroups: gnu.ghostscript.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!xyvi.UUCP!danb
From: danb@xyvi.UUCP (Dan Barooshian)
Subject: Re: Drivers gifmono, pcxmono PROBLEM
Message-ID: <9208051710.AA21645@relay1.UU.NET>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Wed, 5 Aug 1992 06:20:05 GMT
Approved: bug-ghostscript@prep.ai.mit.edu
Lines: 29