comparison CADDSuite-1.6/data/gnuplot/prologue.ps @ 8:dbb480e39d95 draft

Uploaded
author marcel
date Sat, 15 Dec 2012 13:15:46 -0500
parents
children
comparison
equal deleted inserted replaced
7:bfab27640f5e 8:dbb480e39d95
1 %
2 % Gnuplot Prolog Version 4.4 (January 2010)
3 %
4 %/SuppressPDFMark true def
5 %
6 /M {moveto} bind def
7 /L {lineto} bind def
8 /R {rmoveto} bind def
9 /V {rlineto} bind def
10 /N {newpath moveto} bind def
11 /Z {closepath} bind def
12 /C {setrgbcolor} bind def
13 /f {rlineto fill} bind def
14 /Gshow {show} def % May be redefined later in the file to support UTF-8
15 /vpt2 vpt 2 mul def
16 /hpt2 hpt 2 mul def
17 /Lshow {currentpoint stroke M 0 vshift R
18 Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
19 /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R
20 Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
21 /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R
22 Blacktext {gsave 0 setgray show grestore} {show} ifelse} def
23 /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
24 /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def
25 /DL {Color {setrgbcolor Solid {pop []} if 0 setdash}
26 {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def
27 /BL {stroke userlinewidth 2 mul setlinewidth
28 Rounded {1 setlinejoin 1 setlinecap} if} def
29 /AL {stroke userlinewidth 2 div setlinewidth
30 Rounded {1 setlinejoin 1 setlinecap} if} def
31 /UL {dup gnulinewidth mul /userlinewidth exch def
32 dup 1 lt {pop 1} if 10 mul /udl exch def} def
33 /PL {stroke userlinewidth setlinewidth
34 Rounded {1 setlinejoin 1 setlinecap} if} def
35 % Default Line colors
36 /LCw {1 1 1} def
37 /LCb {0 0 0} def
38 /LCa {0 0 0} def
39 /LC0 {1 0 0} def
40 /LC1 {0 1 0} def
41 /LC2 {0 0 1} def
42 /LC3 {1 0 1} def
43 /LC4 {0 1 1} def
44 /LC5 {1 1 0} def
45 /LC6 {0 0 0} def
46 /LC7 {1 0.3 0} def
47 /LC8 {0.5 0.5 0.5} def
48 % Default Line Types
49 /LTw {PL [] 1 setgray} def
50 /LTb {BL [] LCb DL} def
51 /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def
52 /LT0 {PL [] LC0 DL} def
53 /LT1 {PL [4 dl1 2 dl2] LC1 DL} def
54 /LT2 {PL [2 dl1 3 dl2] LC2 DL} def
55 /LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def
56 /LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def
57 /LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def
58 /LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def
59 /LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def
60 /LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def
61 /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def
62 /Dia {stroke [] 0 setdash 2 copy vpt add M
63 hpt neg vpt neg V hpt vpt neg V
64 hpt vpt V hpt neg vpt V closepath stroke
65 Pnt} def
66 /Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V
67 currentpoint stroke M
68 hpt neg vpt neg R hpt2 0 V stroke
69 } def
70 /Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
71 0 vpt2 neg V hpt2 0 V 0 vpt2 V
72 hpt2 neg 0 V closepath stroke
73 Pnt} def
74 /Crs {stroke [] 0 setdash exch hpt sub exch vpt add M
75 hpt2 vpt2 neg V currentpoint stroke M
76 hpt2 neg 0 R hpt2 vpt2 V stroke} def
77 /TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M
78 hpt neg vpt -1.62 mul V
79 hpt 2 mul 0 V
80 hpt neg vpt 1.62 mul V closepath stroke
81 Pnt} def
82 /Star {2 copy Pls Crs} def
83 /BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M
84 0 vpt2 neg V hpt2 0 V 0 vpt2 V
85 hpt2 neg 0 V closepath fill} def
86 /TriUF {stroke [] 0 setdash vpt 1.12 mul add M
87 hpt neg vpt -1.62 mul V
88 hpt 2 mul 0 V
89 hpt neg vpt 1.62 mul V closepath fill} def
90 /TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
91 hpt neg vpt 1.62 mul V
92 hpt 2 mul 0 V
93 hpt neg vpt -1.62 mul V closepath stroke
94 Pnt} def
95 /TriDF {stroke [] 0 setdash vpt 1.12 mul sub M
96 hpt neg vpt 1.62 mul V
97 hpt 2 mul 0 V
98 hpt neg vpt -1.62 mul V closepath fill} def
99 /DiaF {stroke [] 0 setdash vpt add M
100 hpt neg vpt neg V hpt vpt neg V
101 hpt vpt V hpt neg vpt V closepath fill} def
102 /Pent {stroke [] 0 setdash 2 copy gsave
103 translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
104 closepath stroke grestore Pnt} def
105 /PentF {stroke [] 0 setdash gsave
106 translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
107 closepath fill grestore} def
108 /Circle {stroke [] 0 setdash 2 copy
109 hpt 0 360 arc stroke Pnt} def
110 /CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def
111 /C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def
112 /C1 {BL [] 0 setdash 2 copy moveto
113 2 copy vpt 0 90 arc closepath fill
114 vpt 0 360 arc closepath} bind def
115 /C2 {BL [] 0 setdash 2 copy moveto
116 2 copy vpt 90 180 arc closepath fill
117 vpt 0 360 arc closepath} bind def
118 /C3 {BL [] 0 setdash 2 copy moveto
119 2 copy vpt 0 180 arc closepath fill
120 vpt 0 360 arc closepath} bind def
121 /C4 {BL [] 0 setdash 2 copy moveto
122 2 copy vpt 180 270 arc closepath fill
123 vpt 0 360 arc closepath} bind def
124 /C5 {BL [] 0 setdash 2 copy moveto
125 2 copy vpt 0 90 arc
126 2 copy moveto
127 2 copy vpt 180 270 arc closepath fill
128 vpt 0 360 arc} bind def
129 /C6 {BL [] 0 setdash 2 copy moveto
130 2 copy vpt 90 270 arc closepath fill
131 vpt 0 360 arc closepath} bind def
132 /C7 {BL [] 0 setdash 2 copy moveto
133 2 copy vpt 0 270 arc closepath fill
134 vpt 0 360 arc closepath} bind def
135 /C8 {BL [] 0 setdash 2 copy moveto
136 2 copy vpt 270 360 arc closepath fill
137 vpt 0 360 arc closepath} bind def
138 /C9 {BL [] 0 setdash 2 copy moveto
139 2 copy vpt 270 450 arc closepath fill
140 vpt 0 360 arc closepath} bind def
141 /C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
142 2 copy moveto
143 2 copy vpt 90 180 arc closepath fill
144 vpt 0 360 arc closepath} bind def
145 /C11 {BL [] 0 setdash 2 copy moveto
146 2 copy vpt 0 180 arc closepath fill
147 2 copy moveto
148 2 copy vpt 270 360 arc closepath fill
149 vpt 0 360 arc closepath} bind def
150 /C12 {BL [] 0 setdash 2 copy moveto
151 2 copy vpt 180 360 arc closepath fill
152 vpt 0 360 arc closepath} bind def
153 /C13 {BL [] 0 setdash 2 copy moveto
154 2 copy vpt 0 90 arc closepath fill
155 2 copy moveto
156 2 copy vpt 180 360 arc closepath fill
157 vpt 0 360 arc closepath} bind def
158 /C14 {BL [] 0 setdash 2 copy moveto
159 2 copy vpt 90 360 arc closepath fill
160 vpt 0 360 arc} bind def
161 /C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
162 vpt 0 360 arc closepath} bind def
163 /Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
164 neg 0 rlineto closepath} bind def
165 /Square {dup Rec} bind def
166 /Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def
167 /S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def
168 /S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def
169 /S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
170 /S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def
171 /S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
172 /S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill
173 exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def
174 /S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def
175 /S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
176 2 copy vpt Square fill Bsquare} bind def
177 /S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def
178 /S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def
179 /S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
180 Bsquare} bind def
181 /S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
182 Bsquare} bind def
183 /S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def
184 /S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
185 2 copy vpt Square fill Bsquare} bind def
186 /S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
187 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def
188 /S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def
189 /D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def
190 /D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def
191 /D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def
192 /D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def
193 /D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def
194 /D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def
195 /D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def
196 /D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def
197 /D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def
198 /D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def
199 /D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def
200 /D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def
201 /D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def
202 /D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def
203 /D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def
204 /D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def
205 /DiaE {stroke [] 0 setdash vpt add M
206 hpt neg vpt neg V hpt vpt neg V
207 hpt vpt V hpt neg vpt V closepath stroke} def
208 /BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M
209 0 vpt2 neg V hpt2 0 V 0 vpt2 V
210 hpt2 neg 0 V closepath stroke} def
211 /TriUE {stroke [] 0 setdash vpt 1.12 mul add M
212 hpt neg vpt -1.62 mul V
213 hpt 2 mul 0 V
214 hpt neg vpt 1.62 mul V closepath stroke} def
215 /TriDE {stroke [] 0 setdash vpt 1.12 mul sub M
216 hpt neg vpt 1.62 mul V
217 hpt 2 mul 0 V
218 hpt neg vpt -1.62 mul V closepath stroke} def
219 /PentE {stroke [] 0 setdash gsave
220 translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
221 closepath stroke grestore} def
222 /CircE {stroke [] 0 setdash
223 hpt 0 360 arc stroke} def
224 /Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def
225 /DiaW {stroke [] 0 setdash vpt add M
226 hpt neg vpt neg V hpt vpt neg V
227 hpt vpt V hpt neg vpt V Opaque stroke} def
228 /BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M
229 0 vpt2 neg V hpt2 0 V 0 vpt2 V
230 hpt2 neg 0 V Opaque stroke} def
231 /TriUW {stroke [] 0 setdash vpt 1.12 mul add M
232 hpt neg vpt -1.62 mul V
233 hpt 2 mul 0 V
234 hpt neg vpt 1.62 mul V Opaque stroke} def
235 /TriDW {stroke [] 0 setdash vpt 1.12 mul sub M
236 hpt neg vpt 1.62 mul V
237 hpt 2 mul 0 V
238 hpt neg vpt -1.62 mul V Opaque stroke} def
239 /PentW {stroke [] 0 setdash gsave
240 translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
241 Opaque stroke grestore} def
242 /CircW {stroke [] 0 setdash
243 hpt 0 360 arc Opaque stroke} def
244 /BoxFill {gsave Rec 1 setgray fill grestore} def
245 /Density {
246 /Fillden exch def
247 currentrgbcolor
248 /ColB exch def /ColG exch def /ColR exch def
249 /ColR ColR Fillden mul Fillden sub 1 add def
250 /ColG ColG Fillden mul Fillden sub 1 add def
251 /ColB ColB Fillden mul Fillden sub 1 add def
252 ColR ColG ColB setrgbcolor} def
253 /BoxColFill {gsave Rec PolyFill} def
254 /PolyFill {gsave Density fill grestore grestore} def
255 /h {rlineto rlineto rlineto gsave closepath fill grestore} bind def
256 %
257 % PostScript Level 1 Pattern Fill routine for rectangles
258 % Usage: x y w h s a XX PatternFill
259 % x,y = lower left corner of box to be filled
260 % w,h = width and height of box
261 % a = angle in degrees between lines and x-axis
262 % XX = 0/1 for no/yes cross-hatch
263 %
264 /PatternFill {gsave /PFa [ 9 2 roll ] def
265 PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
266 PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
267 gsave 1 setgray fill grestore clip
268 currentlinewidth 0.5 mul setlinewidth
269 /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
270 0 0 M PFa 5 get rotate PFs -2 div dup translate
271 0 1 PFs PFa 4 get div 1 add floor cvi
272 {PFa 4 get mul 0 M 0 PFs V} for
273 0 PFa 6 get ne {
274 0 1 PFs PFa 4 get div 1 add floor cvi
275 {PFa 4 get mul 0 2 1 roll M PFs 0 V} for
276 } if
277 stroke grestore} def
278 %
279 /languagelevel where
280 {pop languagelevel} {1} ifelse
281 2 lt
282 {/InterpretLevel1 true def}
283 {/InterpretLevel1 Level1 def}
284 ifelse
285 %
286 % PostScript level 2 pattern fill definitions
287 %
288 /Level2PatternFill {
289 /Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8}
290 bind def
291 /KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def
292 << Tile8x8
293 /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke}
294 >> matrix makepattern
295 /Pat1 exch def
296 << Tile8x8
297 /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke
298 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke}
299 >> matrix makepattern
300 /Pat2 exch def
301 << Tile8x8
302 /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L
303 8 8 L 8 0 L 0 0 L fill}
304 >> matrix makepattern
305 /Pat3 exch def
306 << Tile8x8
307 /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L
308 0 12 M 12 0 L stroke}
309 >> matrix makepattern
310 /Pat4 exch def
311 << Tile8x8
312 /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L
313 0 -4 M 12 8 L stroke}
314 >> matrix makepattern
315 /Pat5 exch def
316 << Tile8x8
317 /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L
318 0 12 M 8 -4 L 4 12 M 10 0 L stroke}
319 >> matrix makepattern
320 /Pat6 exch def
321 << Tile8x8
322 /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L
323 0 -4 M 8 12 L 4 -4 M 10 8 L stroke}
324 >> matrix makepattern
325 /Pat7 exch def
326 << Tile8x8
327 /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L
328 12 0 M -4 8 L 12 4 M 0 10 L stroke}
329 >> matrix makepattern
330 /Pat8 exch def
331 << Tile8x8
332 /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L
333 -4 0 M 12 8 L -4 4 M 8 10 L stroke}
334 >> matrix makepattern
335 /Pat9 exch def
336 /Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def
337 /Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def
338 /Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def
339 /Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def
340 /Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def
341 /Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def
342 /Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def
343 } def
344 %
345 %
346 %End of PostScript Level 2 code
347 %
348 /PatternBgnd {
349 TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse
350 } def
351 %
352 % Substitute for Level 2 pattern fill codes with
353 % grayscale if Level 2 support is not selected.
354 %
355 /Level1PatternFill {
356 /Pattern1 {0.250 Density} bind def
357 /Pattern2 {0.500 Density} bind def
358 /Pattern3 {0.750 Density} bind def
359 /Pattern4 {0.125 Density} bind def
360 /Pattern5 {0.375 Density} bind def
361 /Pattern6 {0.625 Density} bind def
362 /Pattern7 {0.875 Density} bind def
363 } def
364 %
365 % Now test for support of Level 2 code
366 %
367 Level1 {Level1PatternFill} {Level2PatternFill} ifelse
368 %
369 /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
370 dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
371 currentdict end definefont pop