File: psdriver.ps

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (151 lines) | stat: -rw-r--r-- 3,010 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
% ***************************************************************************
% 
%  MODULE:       PS driver
%  AUTHOR(S):    Glynn Clements <glynn@gclements.plus.com>
%  COPYRIGHT:    (C) 2007 Glynn Clements
% 
%   This program is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
% 
%   This program is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
% 
% ****************************************************************************

/GRAY {
  255.0 div
  setgray
} bind def
/COLOR {
  3 2 roll 255 div
  3 2 roll 255 div
  3 2 roll 255 div
  setrgbcolor
} bind def
/BOX {
  newpath
  3 index 3 index moveto
  1 index 3 index lineto
  1 index 1 index lineto
  3 index 1 index lineto
  closepath fill
  pop pop pop pop
} bind def
/POINT {
  newpath
  moveto
  currentpoint lineto
  stroke
} bind def
/ERASE {
  erasepage
} bind def
/WIDTH {
  setlinewidth
} bind def
/BITMAP {
  gsave
    4 2 roll translate
    1 index 7 add 8 idiv string /tmpstr exch def
    true [1 0 0 1 0 0] {currentfile tmpstr readhexstring pop} imagemask
  grestore
} bind def
/RASTERGRAY {
  8 exch
  3 index string /tmpstr exch def
  {currentfile tmpstr readhexstring pop} image
} bind def
/RASTERRGB {
  8 exch
  3 index 3 mul string /tmpstr exch def
  {currentfile tmpstr readhexstring pop}
  false 3 colorimage
} bind def
/RASTERMASK {
  6 dict begin
    /ncomp exch def
    /mat exch def
    /rows exch def
    /cols exch def
    /tmpstr ncomp 1 add cols mul string def
    /imgdict 4 dict def
    imgdict begin
      /ImageType 3 def
      /InterleaveType 1 def
      /MaskDict 6 dict def
      MaskDict begin
	/ImageType 1 def
	/Width cols def
	/Height rows def
	/ImageMatrix mat def
	/BitsPerComponent 8 def
	/Decode [0 1] def
      end
      /DataDict 7 dict def
      MaskDict DataDict copy pop
      DataDict begin
	/DataSource {currentfile tmpstr readhexstring pop} def
	/Decode [0 1 0 1 0 1] 0 ncomp 2 mul getinterval def
      end
    end
    imgdict image
  end
} bind def
/RASTERGRAYMASK {
  gsave
    /DeviceGray setcolorspace
    1 RASTERMASK
  grestore
} bind def
/RASTERRGBMASK {
  gsave
    /DeviceRGB setcolorspace
    3 RASTERMASK
  grestore
} bind def
/WINDOW {
  initclip
  exch
  4 -1 roll
  3 -1 roll 2 index sub
  4 -1 roll 2 index sub
  rectclip
} bind def
/EPSWINDOW {
  exch
  4 -1 roll
  3 -1 roll 2 index sub
  4 -1 roll 2 index sub
  rectclip
} bind def
/BEGIN {
  /Height exch def
  /Width exch def
  gsave
} bind def
/END {
  grestore
  showpage
} bind def
/NEW {
  newpath
} bind def
/MOVE {
  moveto
} bind def
/CONT {
  lineto
} bind def
/CLOSE {
  closepath
} bind def
/STROKE {
  stroke
} bind def
/FILL {
  eofill
} bind def