home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
prolog.ps
< prev
next >
Wrap
Text File
|
1996-06-03
|
5KB
|
283 lines
%---------------------------------------------------------------------------
%
% Copyright (c) 1995 by Westmount Technology B.V., Delft, The Netherlands.
%
% This software is furnished under a license and may be used only in
% accordance with the terms of such license and with the inclusion of
% the above copyright notice. This software or any other copies thereof
% may not be provided or otherwise made available to any other person.
% No title to and ownership of the software is hereby transferred.
%
% The information in this software is subject to change without notice
% and should not be construed as a commitment by Westmount Technology B.V.
%
%---------------------------------------------------------------------------
%
% File : @(#)prolog.ps 1.1
% Authors : (Known at wmt)
% Original date : 5-7-95
% History :
% See also :
% Description : prolog file for PostScript files generated by topost
%
%---------------------------------------------------------------------------
% SccsId = @(#)prolog.ps 1.1 28 Jul 1995 Copyright 1995 Westmount Technology
%draw a string
/DrawString {
/str exch def
/y exch def
/x exch def
newpath
x y moveto
str show
} def
% draw a line
/DrawLine {
/y2 exch def
/x2 exch def
/y1 exch def
/x1 exch def
newpath
x1 y1 moveto
x2 y2 lineto
stroke
} def
% draw an arc
/DrawArc {
/ang2 exch def
/ang1 exch def
/ry exch def
/rx exch def
/y exch def
/x exch def
newpath
/arcsave matrix currentmatrix def
x y translate
rx ry scale
0 0 1 ang1 ang2 arc
arcsave setmatrix
stroke
} def
% draw a filled arc
/FillArc {
/ang2 exch def
/ang1 exch def
/r exch def
/y exch def
/x exch def
newpath
x y r ang1 ang2 arc
fill
} def
% draw a filled polygon
/FillPolygon {
newpath
arrpoints
fill
} def
% draw a filled rectangle
/FillRectangle {
/height exch def
/width exch def
/y exch def
/x exch def
newpath
x y moveto
width 0 rlineto
0 height rlineto
width neg 0 rlineto
0 height neg rlineto
closepath
fill
} def
% define a clipped rectangle
/ClipRectangle {
/height exch def
/width exch def
/y exch def
/x exch def
gsave
newpath
x y moveto
width 0 rlineto
0 height rlineto
width neg 0 rlineto
0 height neg rlineto
closepath
% gsave stroke grestore
clip
newpath
} def
% Draw lines which are connected.
/DrawLines {
newpath
arrpoints
stroke
} def
% draw a point
/DrawPoint {
/y exch def
/x exch def
newpath
x y moveto
stroke
} def
% draw several points
/DrawPoints {
newpath
arrpoints
stroke
} def
% draw a rectangle
/DrawRectangle {
/height exch def
/width exch def
/y exch def
/x exch def
x y moveto
width 0 rlineto
0 height rlineto
width neg 0 rlineto
0 height neg rlineto
closepath
stroke
} def
% draw several segment which may not be connected.
/DrawSegments {
/arrlen exch def
/arrlen arrlen 4 mul def % length of array to be defined
/points exch def % array of points
/nr 0 def
0 4 arrlen 1 sub {
pop
/x points nr get def
/nr nr 1 add def
/y points nr get def
/nr nr 1 add def
x y moveto
/x points nr get def
/nr nr 1 add def
/y points nr get def
/nr nr 1 add def
x y lineto
stroke
} for
} def
%draw several rectangles
/DrawRectangles {
/arrlen exch def
/arrlen arrlen 4 mul def % length of array to be defined
/points exch def % array of points
/nr 0 def
0 4 arrlen 1 sub {
pop
/x points nr get def
/nr nr 1 add def
/y points nr get def
/nr nr 1 add def
/width points nr get def
/nr nr 1 add def
/height points nr get def
/nr nr 1 add def
x y width height DrawRectangle
} for
} def
% walk through array of points
/arrpoints {
/arrlen exch def
/arrlen arrlen 2 mul def % length of array to be defined
/points exch def % array of points
/x points 0 get def
/y points 1 get def
x y moveto
2 2 arrlen 2 sub { % for (i = 2; i <= arrlen - 2; i + 2)
/loopvar exch def
/x points loopvar get def
/y points loopvar 1 add get def
x y lineto
} for
} def
/undo_clip {
grestore
} def
/reencodedict 5 dict def
/ReEncode {
reencodedict begin
/newencodingdict exch def
/newfontname exch def
/basefontname exch def
/basefontdict basefontname findfont def
/newfont basefontdict maxlength dict def
basefontdict
{exch dup dup /FID ne exch /Encoding ne and
{exch newfont 3 1 roll put}
{pop pop}
ifelse
}forall
newfont /FontName newfontname put
newfont /Encoding newencodingdict put
newfontname newfont definefont pop
end
} def
/strcat {
/s2 exch def
/s1 exch def
s1 length s2 length add string
dup 0 s1 putinterval
dup s1 length s2 putinterval
} def
/selectEncodedScaledFont {
/fontname exch def
/scaleY exch def
/scaleX exch def
/encfontname fontname dup length string cvs
(-ISOLATIN1) strcat cvlit def
fontname encfontname ISOLATIN1 ReEncode
encfontname findfont
scaleX 0 0 scaleY neg 0 0 6 array astore
makefont setfont
} def