home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Buyer 1996 May
/
buyer-0596.iso
/
business
/
design
/
dwk3
/
libs
/
des_ps.pre
< prev
next >
Wrap
Text File
|
1994-07-01
|
28KB
|
1,107 lines
%-----------------------------------------------------------------------------
% 9999.17 GST 194 - PostScript Preamble file for GST DesignWorks
%-----------------------------------------------------------------------------
% This file is inserted as the prolog when Artwork saves an EPSF file.
% The program generates the initial structure comments required by EPSF
% and strips comments from this file as it merges it into its output.
% The main part of the job is put between the 'EndSetup' and 'Trailer' lines.
%-----------------------------------------------------------------------------
% Naming conventions:
% Names in all lowercase are executable procedures, like built-in postscript
% procedures. Names with the first letter capitalised are variables. Names
% ending in a question mark are boolean: they can have values T or F
%-----------------------------------------------------------------------------
% version 0.29 1.July.94
% NOTE: comments are stripped before printing!
%-----------------------------------------------------------------------------
%
% ArtProcsDict contains all the procedures defined in this prolog
% and must also have enough room for special postscript fill & line style procs.
% ArtVarsDict contains all the variables etc used by the procedures.
/ArtProcsDict 160 dict def
/ArtVarsDict 100 dict def
%---- optional jobtimeout
ArtVarsDict begin
/Timeout 0 def
end
ArtProcsDict begin
%----- abbreviations -----%
/bd { bind def } bind def
/ed { exch def } bd
/np /newpath load def
/cp /closepath load def
/gs { /SavePrint? Print? def gsave } bd
/gr { /Print? SavePrint? def grestore } bd
/SS{}def
/RS{}def
/SM{}def
%----- misc tiny routines -----%
% specialscreen? returns YES if screen frequency <= 30
/specialscreen? { currentscreen pop pop 30 lt } bd
/min{2 copy gt{exch}if pop}bd % minimum of top 2 items on stack
/max{2 copy lt{exch}if pop}bd % maximum ditto
/maxof4 { 3{max}repeat } bd
/pt { 1000 mul 72 div } bd % converts points
/beginlayer { pop /LayerSave save def } bd %% layer number ignored
/endlayer { LayerSave restore } bd
%----- path construction -----%
% P: adjusts positions of thin lines
/p { transform round .4 add exch round .4 add exch itransform } bd
/c { p curveto } bd /m { p moveto } bd /l { p lineto } bd
%---------- Colour handling ----------%
%
% define setcmykcolor if not implemented in printer.
/mysetcmykcolor { % convert CMYK to RGB for monochrome printer
4 1 roll
3 {
3 index add 1 exch sub
dup 0 lt{pop 0}if
3 1 roll
} repeat
setrgbcolor pop
} bd
/initcmykcolor {
/setcmykcolor where dup
/BwPrinter? exch not def
{
pop
}{
/setcmykcolor /mysetcmykcolor load def
} ifelse
} bd
%----- SETCMYK -----%
%
% setcmyk is a low-level routine, called whether or not the
% printer supports colour.
% It is at this level that we perform process colour separation.
% We save the current CMYK setting, and routine currentcmyk can
% be called to enquire the setting.
/setcmyk {
4 copy SaveCmyk astore pop
Comp? { % printing a monochrome or colour composite
BwPrinter? specialscreen? and
{
% printing a special screen on a monochrome composite
% don't convert cmyk, as we'll end up with stripes or dots
% which are too small: convert the largest process colour
% component to gray. (Still not completely correct)
maxof4 1 exch sub setgray
}{
setcmykcolor
} ifelse
}{
SpotSep? { % if printing a spot-colour separation
blank pop % print blank (clear or white, depending on overprint flag)
}{ % else printing a a process separation
4 Separation roll % bring one sep to top
dup 0 eq {
blank pop
}{
1 exch sub setgray
} ifelse
} ifelse
pop pop pop % clear c,m,y from stack
} ifelse
} bd
/currentcmyk {
SaveCmyk aload pop
} bd
%----- APPLYTINT -----%
%
% This is a lower-level colour interface
% which can apply a percentage tint to a set
% of CMYK percentage values.
%
% stack: t% c% m% y% k%
/applytint {
4{
4 index mul
10000 div
4 1 roll
}repeat
setcmyk
pop
} bd
/blank {
1 setgray
/Print? OverPrint? not def
0 0 0 0 SaveCmyk astore pop
} bd
/setgraytint {
dup 0 eq { OverPrint? not } { T } ifelse
/Print? ed
dup /SpotTint ed
100 div 1 exch sub setgray
} bd
%----- COLPROCS -----%
%
% Colprocs is a dictionary containing different procedures for
% setcolour to execute, depending on the type of the object
% on top of the stack when setcolour is called.
% Colours is a dictionary of user-defined colours, indexed by name,
% containing 2-level [ [C M Y K] spot? ] arrays with values in range 0-100
/Colprocs 4 dict def
Colprocs begin
/arraytype { % [ C M Y K ] process colour mix
100 exch aload pop applytint % apply 100% tint to the mix
} bd
% perform spot-colour separation
/nametype { % stack: tint name
dup Colours exch get % tint name [ [ C M Y K ] Spot? ]
1 get not Comp? or { % if not a spot colour, or printing composite
Colours exch get % tint [ [ C M Y K ] Spot? ]
0 get aload pop % tint c m y k
applytint
}{ % else spot colour & not composite printout
SpotSep? { % if printing a spot separation...
Separation eq { % is spot colour same as this separation?
setgraytint % if so, set percentage tint
}{
pop blank % wrong spot sep: print nothing
} ifelse
}{
pop pop blank % printing a process sep: print nothing
} ifelse
} ifelse
} bd
/integertype { % apply percentage tint to black
0 0 0 100 applytint
} bd
/realtype /integertype load def
end % Colprocs
%----- SETCOLOUR -----%
%
% This routine is the top-level color interface.
% It can be called in three different ways:
% number SETCOLOUR -- % number is %black, 0=white 100=black
% [ 4-array ] SETCOLOUR -- % array contains C M Y K percentages
% number name SETCOLOUR -- % percentage tint of a named colour
/setcolour {
/Print? T def
/SpotTint 0 def % preset spot colour tint value to zero
dup type Colprocs exch get exec
} bd
%----- FILL and STROKE -----%
%
% Winding? is a boolean which selects whether we use the winding-number fill
% or the even-odd fill algorithm. Print? is a boolean used to enable or
% disable fill and stroke when overprinting separations, set by setcolour
% and blank.
/ovp { /OverPrint? ed } bd
/wif { /Winding? T def } bd
/eof { /Winding? F def } bd
/~stroke { Print? { stroke } if } bd
/_stroke { setcolour ~stroke } bd
/~fill { Print? { Winding? { fill } { eofill } ifelse } if } bd
/_fill { setcolour ~fill } bd
/_clip { Winding? { clip } { eoclip } ifelse } bd
/sml { 2 div sin 1 exch div setmiterlimit } bd
/sline { setlinewidth setlinejoin setlinecap } bd
/li { Lines exch get exec } bd
/fi { Fills exch get exec } bd
%----- GROUPS -----%
/bg { gsave concat } bd % matrix BG --
/eg { grestore } bd
%----- Utility Routines -----%
/getbox { /Top ed /Right ed /Bottom ed /Left ed } bd
/arcpop { arcto 4 { pop } repeat } bd
%----- basic shapes: ROUND BOX -----%
/shape_rbox {
/Rad ed
getbox
matrix currentmatrix
exch concat
np Left Right add 2 div Top p moveto % top centre
Right Top p Right Bottom p Rad arcpop
Right Bottom p Left Bottom p Rad arcpop
Left Bottom p Left Top p Rad arcpop
Left Top p Right Top p Rad arcpop cp
setmatrix
} bd
%----- basic shapes: BOX -----%
/boxpath {
np Left Top m Right Top l
Right Bottom l Left Bottom l cp
} bd
/shape_box {
getbox
matrix currentmatrix
exch concat boxpath
setmatrix
} bd
/clip_box { getbox boxpath eoclip } bd
%----- basic shapes: ELLIPSE -----%
/shape_ellipse {
getbox
matrix currentmatrix
exch concat
% map unit circle to bounding box
Left Top translate
Right Left sub Bottom Top sub scale
np .5 .5 .5 0 360 arc cp
setmatrix
} bd
%----- IMAGES -----%
/artimage {
gs
/Bgd? exch def
/Mask? exch def
/Bits exch def
/Height exch def
/Width exch def
getbox concat
Bgd? { setcolour boxpath wif ~fill } if
Left Top translate
Right Left sub
Bottom Top sub scale
Mask? {
setcolour
Width Height true [ Width 0 0 Height 0 0 ]
{ currentfile ImageBuff readhexstring pop }
imagemask
}{ Width Height Bits [ Width 0 0 Height 0 0 ]
{ currentfile ImageBuff readhexstring pop }
image
} ifelse
gr
} bd
/densitylookup {
densitygreys 1 sub mul cvi % convert input grey level to integer
densityarray exch get % lookup value (range 0..2000)
1000 div % convert to density 0.0-2.0
neg 10 exch exp % reflectance = 10 ^ -density
} bd
/palettelookup {
palettecols 1 sub mul cvi % convert input grey level to integer
palettearray exch get % lookup value (range 0..1000)
1000 div % convert to reflectance 0..1
} bd
/artcolimage {
gs
/Proc exch load def
/Height ed /Width ed
getbox concat
Left Top translate
Right Left sub
Bottom Top sub scale
/Im? T def
/Wn Width def
Width Height 8 [ Width 0 0 Height 0 0 ]
/Proc load
false 3 colorimage
gr
} bd
/img4 {
Im? {
% read one byte from the file
currentfile ImageBuff readhexstring pop
0 get -4 bitshift
}{
ImageBuff 0 get
}ifelse
%--- see if we're at the end of a raster line
Wn 1 sub dup 0 eq { pop Width T }{ Im? not } ifelse
/Im? ed /Wn ed
% use result as index into palette
15 and palettearray exch get
} bd
/img8 {
currentfile ImageBuff readhexstring pop % read one byte from the file
0 get palettearray exch get % use that as index into palette
} bd
/img24 {
currentfile ImageRgbBuff readhexstring pop % read 3 bytes from the file
} bd
%----- normalised transfer function -----%
/normalise
{
mark
1.0 1.0 .98 .9 .82 .68
.56 .48 .28 .1 .06 .0 % i [ nvalues
counttomark % i [ nvalues n
dup 3 add -1 roll exch % [ nvalues input n
2 sub mul % [ nvalues j % j = (n-2)*i k=floor(j)
dup floor cvi % [ nvalues j k
dup 3 1 roll sub % [ nvalues k j-k
exch dup % [ nvalues j-k k k
3 add index exch 2 add index dup % [ nvalues j-k table[k+1] table[k] table[k]
4 1 roll % [ nvalues table[k] j-k table[k+1] table[k]
sub mul add % [ nvalues result % result = ( table[k] + (j-k)*(table[k+1]-table[k]) )
counttomark 1 add 1 roll % result [ nvalues
cleartomark % result
} bd
/?Negative {} bd % if printing negative, this procedure changes
/neg_transfer {
/?Negative { 1 exch sub } bd
{ ?Negative normalise DefTran } bind settransfer
gs clippath 1 setgray fill gr % then fill with white
} bd
%----- Special Effects: Flatten Path -----%
%
% flatten path, adjust 'setflat' until it works.
% no parameters, no output. NOTE: this leaves a 'gs' in effect
/flatclip {
currentflat
{
gs
{ flattenpath _clip } stopped not {exit}if
% ie, if not stopped due to error, exit loop
% but if the error was other than limitcheck, stop now!
$error /errorname get /limitcheck ne { stop } if
% if flatness gets too high, give up
currentflat 80 gt { exit } if
% try again with flatter paths
gr currentflat 1.1 mul 1 add setflat
}loop
setflat
} bd
/flatp {
currentflat
{ {flattenpath} stopped not {exit}if
currentflat 1 add setflat
}loop
setflat
} bd
%----- Special Effects: Clip to Path -----%
%
% Also computes bounding box and width and height.
% NOTE: flatclip saves graphics state
/clipper {
pathbbox flatclip
/Bottom ed /Right ed /Top ed /Left ed
Right Left sub /Width ed
Bottom Top sub /Height ed
} bd
%----- Example of a special fill routine -----%
/examplefill {
clipper %gs implied
Left Top translate
% insert commands to fill area from (0,0) to (Width,Height)
Width Height scale
% or insert commands to fill unit square
gr
} bd
%----- Graduated Fill Support Code -----%
/GradFillDict 30 dict def
/GrayProcs [
{} % 0: radial
{dup mul} bind % 1: spherical
{} % 2
{} % 3: linear
{9 mul 1 add log} bind % 4: logarithmic
{dup 1 exch sub mul 4 mul} bind % 5: cylindrical
] def
/grayconv { % start diff ingray GRAYCONV outgray
GrayProcs GradType get exec
mul add
} bd
/grad_common_init {
%---- initialise variables in local dictionary
% convert start colour to CMYK and get values
setcolour
SpotSep? not {
currentcmyk
/StartK ed /StartY ed /StartM ed /StartC ed
} if
/StartT SpotTint def
% do the same for the end colour
setcolour
SpotSep? not {
currentcmyk
/EndK ed /EndY ed /EndM ed /EndC ed
} if
/EndT SpotTint def
% replace End with End-Start
SpotSep? not {
/EndC EndC StartC sub def
/EndM EndM StartM sub def
/EndY EndY StartY sub def
/EndK EndK StartK sub def
} if
/EndT EndT StartT sub def
% If printing colour separations, if the separation has
% the same tint for the start and end of the grad fill,
% treat it as a solid fill to save time.
/SolidFill? F def
Comp? not { % not printing a composite - separations
SpotSep? { % printing a spot colour sep
StartT setgraytint
EndT 0 eq /SolidFill? ed
}{ % printing a process sep
mark
StartC StartM StartY StartK 4 Separation roll
100 mul setgraytint % 0.22
EndC EndM EndY EndK 4 Separation roll
0 eq /SolidFill? ed
cleartomark
} ifelse
} if
} bd
/grad_common_middle {
/X ed
SpotSep? {
StartT EndT X grayconv
setgraytint
}{
StartC EndC X grayconv
StartM EndM X grayconv
StartY EndY X grayconv
StartK EndK X grayconv
setcmyk
} ifelse
} bd
%----- Graduated Fill: linear, logarithmic, cylindrical -----%
%
% parameters: angle type startcolour endcolour
% each colour can be either a number (for a black tint)
% a number and a name, or an array of four values:
% the same as setcolour.
% type: 3=linear 4=logarithm 5=cylinder
/linfill {
GradFillDict begin
grad_common_init
/GradType ed
neg /Theta ed
/Steps GradType 3 ne { 200 } { 100 } ifelse def
% also uses Top Bottom Left Right Width Height in dictionary
SolidFill? {
~fill % separation, and fill is solid for this sep
}{
%---- prepare to fill to clipping path
% and setup transformation matrix
gs
Theta rotate
clipper %gs implied
Left Top translate
Width Height scale
1 Steps 1 add div setlinewidth
0 1 Steps {
dup Steps div
grad_common_middle
newpath
.5 add
Steps 1 add
div 0
moveto
0 1 rlineto
~stroke
} bind for
gr gr
}ifelse
end
} bd
%----- Radial/Spherical Graduated Fill -----%
%
% stack: type startcolour endcolour
% type: 0=radial, 1=spherical
/radfill {
GradFillDict begin
grad_common_init
/GradType ed
/Steps GradType 0 ne { 200 } { 100 } ifelse def
SolidFill? {
~fill % separation, and fill is solid for this sep
}{
clipper %gs implied
Left Right add 2 div Top Bottom add 2 div translate % centre
Width dup mul Height dup mul add sqrt 2 div dup scale % half diagonal
Steps -1 1 { % loop to fill unit circle centred on origin
/Rad exch Steps div def
Rad grad_common_middle
np 0 Rad moveto 0 0 Rad 0 360 arc cp
~fill
} bind for
gr
} ifelse
end
} bd
%----- Arrowheads -----------
/ArrowProcs [
{}
{np 0 25 m 50 0 l 0 -25 l cp fill }
{np 0 25 m 50 0 l 0 -25 l cp stroke }
{np 0 0 m -10 25 l 50 0 l -10 -25 l cp fill }
{np 5 0 m -5 25 l 50 0 l -10 -25 l cp stroke }
{np -45 25 m 5 0 l -45 -25 l stroke }
{np 0 25 m 0 -25 l stroke }
{np 2 setlinejoin -50 25 m 0 0 l -50 -25 l 0 25 m 0 -25 l stroke }
{np 50 25 m 0 0 l 50 -25 l stroke }
{np 100 25 m 50 0 l 100 -25 l 50 0 m 0 0 l 50 25 m 0 0 l 50 -25 l stroke }
{np 100 25 m 50 0 l 100 -25 l 45 -25 l 0 -5 l 0 5 l 45 25 l cp fill }
] def
% type dx dy scale x y arrow
/arrow {
gs
translate
dup 20 lt { pop 20 } if
10 div dup scale
exch atan 180 add rotate
0 0 10 sline
Print? {
ArrowProcs exch get exec
}{
pop
} ifelse
gr
} bd
%----- Tiled Fill -----------
/TiDict 20 dict def
/tipos { % pos wid
dup % pos wid wid
3 1 roll % wid pos wid
div floor mul % pos'
} bd
/_tile { % dx dy proc scaledwidth scaledheight scale(percent) angle
TiDict begin
/TiAngle ed
100 div /Tscale ed
Tscale div /TiHgt ed
Tscale div /TiWid ed
/TiProc ed
% leave just dx & dy on stack
gs 1 setgray ~fill gr % 0.18: fill shape with white
gs
translate TiAngle neg rotate Tscale dup scale
flatclip pathbbox /TiBottom ed /TiRight ed /TiTop ed /TiLeft ed
TiTop TiHgt tipos TiHgt TiBottom {
gs 0 exch translate
TiLeft TiWid tipos TiWid TiRight {
gs 0 translate /TiProc load
ArtVarsDict begin exec end gr
} for
gr
}for
gr gr
end
} bd
%--------- TEXT HANDLING -----------%
/begintext { matrix currentmatrix } bd % leave current matrix on top of stack
/endtext { setmatrix } bd % restore saved matrix
/ntm { exch dup setmatrix exch concat } bd % newtextmatrix: matrix
/textstyle { % proc
/SimpleText? F def
/filltext exch bind def
} bd
/plaintext { % <colour & tint>
F ovp
setcolour
/SimpleText? T def
} bd
/tf { % textfont: size width fontname
findfont 3 1 roll
exch neg matrix scale makefont
setfont
} bd
/txt { % x y string
3 1 roll moveto
SimpleText?
{
Print? { show } if
}{
{
currentpoint np moveto
tempstr 0 2 index put
tempstr T charpath filltext
pop
} forall
} ifelse
} bd
/filltext { } def
/title {
gs
moveto
{270 rotate} if
100 pt exch div dup neg scale
/Helvetica findfont 10 scalefont setfont
show
gr
} bd
/regmark {
gs translate
1 setlinewidth
np -100 0 moveto 100 0 lineto stroke
np 0 -100 moveto 0 100 lineto stroke
np 0 0 50 0 360 arc stroke
gr
} bd
/cropmark {
gs 1 setlinewidth np moveto lineto stroke gr
} bd
%----- Routines to rearrange font to match Windows Ansi character set -----%
/ANSI_Vec [
/grave/acute/circumflex/tilde/macron/breve/dotaccent/dieresis
/ring/cedilla/hungarumlaut/ogonek/caron/dotlessi/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
/zero/one/two/three/four/five/six/seven
/eight/nine/colon/semicolon/less/equal/greater/question
/at/A/B/C/D/E/F/G
/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W
/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
/grave/a/b/c/d/e/f/g
/h/i/j/k/l/m/n/o
/p/q/r/s/t/u/v/w
/x/y/z/braceleft/bar/braceright/asciitilde/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
] def
/ReEncDict 12 dict def
/ischar {
BaseFontDict /CharStrings get exch known
}bd
/mapch {
dup ischar not
{pop /.notdef} if
NewFont /Encoding get 3 1 roll put
}bd
/mapdegree{ 16#b0 /degree ischar {/degree}{/ring} ifelse mapch } bd
/mapbb { 16#a6 /brokenbar ischar {/brokenbar}{/bar}ifelse mapch } bd
/reencoderange {
{ dup ANSI_Vec exch get mapch } for
} bd
/reencode {
0 1 15 reencoderange
144 1 255 reencoderange
16#27 /quotesingle mapch
16#60 /grave mapch
16#7C /bar mapch
mapdegree mapbb
} bd
/ansifont {
ReEncDict begin
/NewFontName exch def
/BaseFontName exch def
FontDirectory NewFontName known not
{
/BaseFontDict BaseFontName findfont def
/NewFont BaseFontDict maxlength dict def
BaseFontDict {
exch dup /FID ne {
dup /Encoding eq {
exch
dup length array copy
NewFont 3 1 roll put
}{
exch
NewFont 3 1 roll put
}
ifelse
}{
pop pop
}ifelse
}forall
NewFont /FontName NewFontName put
% look at the charstrings see if it has 'A' and 'Z':
% if so, remap the font. If not, leave it alone!
/A ischar /Z ischar and { reencode } if
NewFontName NewFont definefont pop
} if
NewFontName
end
} bind def
%----- Colour Separation Setup Procedures -----%
%
% Separation: if undefined, a composite is produced
% if numeric, a process colour separation is produced
% 3=cyan, 2=magenta, 1=yellow, 0=black
% if a name of a spot colour, that spot separation is produced
%
% example:
% /Separation 3 def setupsep
% /Separation /Reflex_Blue def setupsep
/setupsep {
/Separation where { % is 'Separation' defined?
pop
/Comp? F def % yes: we're doing a separation.
Separation type % is it a number?
0 type ne
/SpotSep? ed % if not, we're doing a spot colour.
}{
/Comp? T def % separation not defined: doing a composite.
/SpotSep? F def
} ifelse
statusdict begin Timeout setjobtimeout end % timeout per separation
} bd
/setsepscreen { AngleFix add /DefScrFun load setscreen } bd
%---------- included EPSF procedure
/include_epsf {
/Bottom ed /Left ed
gsave concat
% assumes that bottom-left of rect corresponds to EPSF's origin
Left Bottom translate
1000 72 div dup neg scale
/EpsfSave save def
/showpage { } def
currentfile cvx stopped { % did it stop?
$error /newerror get { % was it a new error?
handleerror % put out an error message
% skip to end of included file
{ % loop
currentfile LineBuff readline {
(\045\045EndEPSF) eq { exit } if
}{
% can't find end marker - hit EOF?
} ifelse
} loop
} if
}{
% didn't stop - hit EOF?
} ifelse
$error /newerror F put
EpsfSave restore
grestore
} bd
%--------------------------------- downloaded font stuff -------------------
/BuildDict 3 dict def
/PointProcs[{}{closepath moveto}bind/lineto load/curveto load]def
/gst_char { gstn 8 bitshift add /gstn ed /gsti gsti 1 add def
gsti 3 eq {
gstn 2047 and dup 1600 gt { 2048 sub } if
gstn -11 bitshift 2047 and dup 1600 gt { 2048 sub } if
gstn -22 bitshift 3 and PointProcs exch get exec
/gstn 0 def /gsti 0 def
} if
} bd
/gst_build {
exch begin
BuildDict begin
Encoding exch get
/gstn 0 def /gsti 0 def
dup Metrics exch get 0 setcharwidth
newpath CharStrings exch get { gst_char } forall
closepath fill
end
end
} bd
/gst_fast {
exch begin
Encoding exch get
dup Metrics exch get 0 setcharwidth
CharStrings exch get cvx exec
end
} bd
/newgstfont {
ReEncDict begin
/NewFontSize ed
/NewFontId ed
/NewFontFast ed
/NewFontName ed
10 dict dup begin
/FontMatrix [ .001 0 0 .001 0 0 ] def
/FontType 3 def
/FontBBox [ -400 -300 1600 1000 ] def
/Encoding ANSI_Vec def
/Metrics NewFontSize dict def Metrics /.notdef 0 put
/CharStrings NewFontSize dict def CharStrings /.notdef () put
/UniqueID 16#ff0000 NewFontId add def
/gst_fast /gst_build NewFontFast { exch } if load /BuildChar ed pop
end
NewFontName exch definefont pop
NewFontName
end
} bd
/NewCharDict 4 dict def
/newchar {
NewCharDict begin
/Proc ed
/Wid ed
/Code ed
dup findfont begin
Encoding Code get dup
CharStrings exch /Proc load put
Metrics exch Wid put
end
end
} bd
%%EndProlog
%%BeginSetup
/ArtworkSave save def
ArtVarsDict begin
% boolean abbreviations
/T true def /F false def
% initialise default line end, join, mitre limit etc
1 1 14 sline 10 sml
% initialise misc variables
/tempstr 1 string def % buffer for text
/ImageBuff 1 string def % buffer for bitmap images
/ImageRgbBuff 3 string def % buffer for bitmap images
/LineBuff 256 string def % buffer for included epsfs
/SimpleText? T def % flag for fast text handling
/Wind? T def % winding fill on/off
/Print? T def % print flag used by colour separation stuff
/SaveCmyk 4 array def % current C,M,Y,K colour
/Imat matrix identmatrix def % an indentity matrix
/bignum 2 31 exp 1 sub def % for random number generator
initcmykcolor
% determine current transformation's rotation, (eg for landscape)
% which will need to be applied to any screen angles
/AngleFix 1 0 dtransform exch atan def
% record the current screen function, angle and frequency
currentscreen /DefScrFun exch def pop pop
ArtProcsDict /Screens known {
currentscreen Screens exch 0 exch put pop pop
} if
% record the current transfer function, and set up a normalised
% transfer function followed by the default
/DefTran currenttransfer def
{normalise DefTran}bind settransfer
%%EndSetup
%%Trailer
end % ArtVarsDict
ArtworkSave restore
end % ArtProcsDict
%%EOF