summaryrefslogtreecommitdiff
path: root/support/mid2tex/doc/diag.ps
blob: 6c1c155ff942a8a0a6c945b94425ee1a4c5a337b (plain)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
%!PS-Adobe-3.0
%%Title: diag1.ps
%%Creator: ImageMagick
%%CreationDate: Mon Jul 29 13:18:00 1996
%%BoundingBox: 18 94 594 646
%%Orientation: Portrait
%%PageOrder: Ascend
%%Pages: 1
%%EndComments
%%BeginProlog
%
% Display a color image.  The image is displayed in color on
% Postscript viewers or printers that support color, otherwise
% it is displayed as grayscale.
%
/buffer 512 string def
/byte 1 string def
/color_packet 3 string def
/pixels 768 string def

/DirectClassPacket
{
  %
  % Get a DirectClass packet.
  %
  % Parameters: 
  %   red.
  %   green.
  %   blue.
  %   length: number of pixels minus one of this color (optional).
  %
  currentfile color_packet readhexstring pop pop
  compression 0 gt
  {
    /number_pixels 3 def
  }
  {
    currentfile byte readhexstring pop 0 get
    /number_pixels exch 1 add 3 mul def
  } ifelse
  0 3 number_pixels 1 sub
  {
    pixels exch color_packet putinterval
  } for
  pixels 0 number_pixels getinterval
} bind def

/DirectClassImage
{
  %
  % Display a DirectClass image.
  %
  systemdict /colorimage known
  {
    columns rows 8
    [
      columns 0 0
      rows neg 0 rows
    ]
    { DirectClassPacket } false 3 colorimage
  }
  {
    %
    % No colorimage operator;  convert to grayscale.
    %
    columns rows 8
    [
      columns 0 0
      rows neg 0 rows
    ]
    { GrayDirectClassPacket } image
  } ifelse
} bind def

/GrayDirectClassPacket
{
  %
  % Get a DirectClass packet;  convert to grayscale.
  %
  % Parameters: 
  %   red
  %   green
  %   blue
  %   length: number of pixels minus one of this color (optional).
  %
  currentfile color_packet readhexstring pop pop
  color_packet 0 get 0.299 mul
  color_packet 1 get 0.587 mul add
  color_packet 2 get 0.114 mul add
  cvi
  /gray_packet exch def
  compression 0 gt
  {
    /number_pixels 1 def
  }
  {
    currentfile byte readhexstring pop 0 get
    /number_pixels exch 1 add def
  } ifelse
  0 1 number_pixels 1 sub
  {
    pixels exch gray_packet put
  } for
  pixels 0 number_pixels getinterval
} bind def

/GrayPseudoClassPacket
{
  %
  % Get a PseudoClass packet;  convert to grayscale.
  %
  % Parameters: 
  %   index: index into the colormap.
  %   length: number of pixels minus one of this color (optional).
  %
  currentfile byte readhexstring pop 0 get
  /offset exch 3 mul def
  /color_packet colormap offset 3 getinterval def
  color_packet 0 get 0.299 mul
  color_packet 1 get 0.587 mul add
  color_packet 2 get 0.114 mul add
  cvi
  /gray_packet exch def
  compression 0 gt
  {
    /number_pixels 1 def
  }
  {
    currentfile byte readhexstring pop 0 get
    /number_pixels exch 1 add def
  } ifelse
  0 1 number_pixels 1 sub
  {
    pixels exch gray_packet put
  } for
  pixels 0 number_pixels getinterval
} bind def

/PseudoClassPacket
{
  %
  % Get a PseudoClass packet.
  %
  % Parameters: 
  %   index: index into the colormap.
  %   length: number of pixels minus one of this color (optional).
  %
  currentfile byte readhexstring pop 0 get
  /offset exch 3 mul def
  /color_packet colormap offset 3 getinterval def
  compression 0 gt
  {
    /number_pixels 3 def
  }
  {
    currentfile byte readhexstring pop 0 get
    /number_pixels exch 1 add 3 mul def
  } ifelse
  0 3 number_pixels 1 sub
  {
    pixels exch color_packet putinterval
  } for
  pixels 0 number_pixels getinterval
} bind def

/PseudoClassImage
{
  %
  % Display a PseudoClass image.
  %
  % Parameters: 
  %   colors: number of colors in the colormap.
  %   colormap: red, green, blue color packets.
  %
  currentfile buffer readline pop
  token pop /colors exch def pop
  /colors colors 3 mul def
  /colormap colors string def
  currentfile colormap readhexstring pop pop
  systemdict /colorimage known
  {
    columns rows 8
    [
      columns 0 0
      rows neg 0 rows
    ]
    { PseudoClassPacket } false 3 colorimage
  }
  {
    %
    % No colorimage operator;  convert to grayscale.
    %
    columns rows 8
    [
      columns 0 0
      rows neg 0 rows
    ]
    { GrayPseudoClassPacket } image
  } ifelse
} bind def

/DisplayImage
{
  %
  % Display a DirectClass or PseudoClass image.
  %
  % Parameters: 
  %   x & y translation.
  %   x & y scale.
  %   image label.
  %   image columns & rows.
  %   class: 0-DirectClass or 1-PseudoClass.
  %   compression: 0-RunlengthEncodedCompression or 1-NoCompression.
  %   hex color packets.
  %
  gsave
  currentfile buffer readline pop
  token pop /x exch def
  token pop /y exch def pop
  x y translate
  currentfile buffer readline pop
  token pop /x exch def
  token pop /y exch def pop
  /NewCenturySchlbk-Roman findfont 24 scalefont setfont
  currentfile buffer readline pop
  0 y 12 add moveto buffer show
  x y scale
  currentfile buffer readline pop
  token pop /columns exch def
  token pop /rows exch def pop
  currentfile buffer readline pop
  token pop /class exch def pop
  currentfile buffer readline pop
  token pop /compression exch def pop
  class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
  grestore
  showpage
} bind def
%%EndProlog
%%Page:  1 1
%%BeginData:
DisplayImage
18 94
576 552
            
359 344
1
0
2
000000
ffffff
01ff01ff01ff01ff01ff01ff01ff0158000001ff0165000001ff0165000001ff01650000
01ff0165000001ff0165000001ff0165000001ff0165000001ff0165000001ff01650000
01ff0165000001ff0165000001ff0165000001ff0165000001ff0165000001ff01650000
01ff0165000001ff0165000001ff0165000001ff0165000001ff0165000001ff01650000
01ff0165000001ff0165000001ff0165000001ff0165000001ff0165000001ea00030176
000001e800030178000001e60003017a000001e40003017c000001e20003017e000001e0
00030180000001de00030182000001dc00030184000001da00030186000001d800030188
000001d60003018a000001d40003018c000001d20003017d0002010100020108000001d0
0002017f00010100000001000001010000000108000001ce000201840000010000000101
00010107000001cc00020184000201000000010100010107000001ca0003018700020101
00010102000501c800030186000101000002010100010107000001c50003018900010100
000001010000010000000108000001c40002018c0001010200010109000001c10003019f
000001c0000201a1000001bd000301a3000001bc000201a5000001b9000301a7000001b7
000301a9000001b5000301ab000001b3000301ad000001b1000301af000001af000301b1
000001ad000301b3000001ab000301b5000001a9000201b8000001a7000301b9000001a5
000301bb000001a3000301bd000001a1000301bf0000019e000301c20000019d000201c4
0000019b000301c500000199000201c800000197000201ca00000195000201cc00000194
000201cd00000194000101ce00000193000201ce00000193000101cf00000192000201cf
00000191000201d000000191000101d100000190000201d100000190000101d20000018f
000201d20000018f000101d30000018e000201d30000018d000201c30002010100020108
0000018d000101c30001010000010100000101090000018c000201c30001010000010101
000001090000018c000101c70000010100000100000001030005018b000101c700010103
000101070000018b000101c60001010000020100000101070000018a000101c600030100
000001010000010800000189000201cc0001010900000189000101d900000188000201d9
00000188000101da00000187000201da00000186000201db00000186000101dc00000185
000201dc00000185000101dd00000184000201dd00000184000101de00000183000101df
00000182000201df00000182000101e000000181000101e100000181000101e100000180
000101e20000017f000201e20000017f000101e30000017e000201e30000017e000101e4
0000017d000201e40000017c000201e50000017c000101e60000017b000201e60000017b
000101e70000017a000201e70000017a000101e800000179000101e900000179000101e9
00000178000101ea00000177000201ea00000177000101eb00000176000101ec00000175
000201ec00000175000101ed00000174000201dc000201010002010800000174000101dc
00010100000301000000010800000173000101dd00010100000201010001010700000173
000101e000000100000001010001010200050172000101e0000101000000010100010107
00000171000201df00010100000101010001010700000171000101df0003010100000100
0000010800000170000201e50001010900000170000101f20000016f000101f30000016e
000201f30000016e000101f40000016d000101b20003010c00020107000101240000016d
000101b30001010d000001000000010b000001210000016c000201b30001010300010101
0001010000040100000301000001010000010100000201200000016c000101b400010102
000101000000010100000100000101000000010100000100000301000000010000000101
000001210000016b000101b5000101010000010000020101000001000001010000000101
000201000003010000000101000001210000016a000201b5000101010002010000010100
000001000001010000000102000001000001010300000101000001210000016a000101b6
000101000006010000000100000101000000010100050100000001000000010100010120
00000169000101f900000169000101f900000168000101c60001013100000167000201fa
00000167000101c7000101000003012c00000166000201c800000101000001000001012b
00000166000101c900000101000001000001012b00000165000201c90000010100000100
0001012b00000164000201ca00000101000001000001012b00000164000101fe00000163
000201fe00000163000101bb00030104000101100001012500000162000101bb00000102
00000105000001100001012500000162000101bb00010104000101010005010000010100
0003010200020101000101000003011c00000161000101bd000301000001010000000100
000001000000010100000100000101010000010000030100000101000001010000000100
000001000001011b00000160000201bf0001010000030100000101020000010000010101
00000100000201010001010000030100000001000001011b00000160000101bd00000102
000001000000010300020101000001000001010100000100000201010001010000000103
000001000001011b0000015f000201bd0001010100000100000101000000010000000100
000101000000010000010101000001000001010000000100000101000001010000000100
000001000001011b0000015f000101be00000100000101400000015e000101ff01040000
015d000201ff01040000015d000101ff01050000015c000201ff01050000015c000101f6
00000102000201080000015b000101f600010102000101090000015b000101f700000103
000001090000015a000201f700000102000001000000010300050159000201f800000104
0001010700000159000101f900000101000101000001010700000158000201f900000101
000001010000010800000158000101fe0001010900000157000101ff010b000001570001
01ff010b00000156000101ff010c00000155000101ff010d00000155000101ff010d0000
0154000101ff010e00000154000101ff010e00000153000101ff010f00000152000201ff
010f00000152000101ff011000000151000201ff011000000150000201ff011100000150
000101ff01120000014f000201ff01120000014f000101ff01130000014e000201ff0113
0000014e000101ff01140000014d000201ff01140000014d000101ff01150000014c0001
01ff01160000014b000201ff01160000014b000101ff01170000014a000101ff01180000
0149000201ff011800000149000101ff011900000149000101ff011900000148000101ff
011a00000147000201ff011a00000147000101ff011b00000146000101ff011c00000145
000201ff011c00000145000101ff011d00000144000201ff011d00000144000101ff011e
00000143000101ff011f00000143000101ff010f000001020002010800000142000101ff
010f00010101000101000000010800000141000201ff0110000001010000010100010102
00050141000101ff011100000101000001010001010700000140000101ff011200000101
000001010001010700000140000101ff01120000010100000101000101070000013f0001
01ff01130000010200000100000001080000013e000201ff0117000101090000013e0001
01ff01240000013d000101ff01250000013d000101ff01250000013c000101ff01260000
013c000101ff01260000013b000101ff01270000013a000201ff01270000013a000101ff
012800000139000101ff012900000139000101ff012900000138000101ff012a00000137
000201ff012a00000137000101ff012b00000136000201ff012b00000136000101ff012c
00000135000101ff012d00000135000101ff012d00000134000101ff012e000001330002
01ff012e00000133000101ff012f00000132000101ff013000000131000201ff01300000
0131000101ff013100000130000201ff013100000130000101ff01320000012f000201ff
01320000012f000101ff01330000012e000101ff01340000012d000201ff01340000012d
000101ff01350000012c000201ff01350000012c000101ff01360000012b000101ff0137
0000012b000101ff01370000012a000101ff012c000201080000012a000101ff012c0001
010900000129000101ff012e0000010900000128000201ff012d00000100000001030005
0127000201ff01300001010700000127000101ff012e0001010000010107000001260002
01ff012e000001010000010800000126000101ff01300001010900000125000201ff013c
00000125000101ff013d00000124000201ff013d00000123000201ff013e000001230001
01ff013f00000122000201ff013f00000122000101ff014000000121000201ff01400000
0121000101ff014100000120000101ff01420000011f000201ff01420000011e000201ff
01430000011d000201ff01440000011c000201ff01450000011a000201ff014700000119
000201ff014800000118000201ff014900000117000201ff014a00000116000201ff014b
00000114000201ff014d00000113000201ff014e00000112000201ff014f000001110001
01ff015100000110000201ff01510000010e000201ff01530000010d000201ff01540000
010c000201ff01550000010b000201ff015600000109000201ff015800000108000201ff
015900000106000301ff015a00000104000301ff015c00000102000301ff015e00000101
000201ff016000000100000201ff016100000100000101ff0162000201ff0163000201ff
0162000101ff016500fe019200000128000001290000012800000129000001bb00000128
000001290000012800000129000001bb00000128000001290000012800000129000001bb
00000128000001290000012800000129000001ff01ff01ff01ff01ec0002010100020121
0002010100020121000401000002012000000102000201010002011d0000010200020101
000201b10001010000010100000101220001010100010100000001210004010000010120
000101010001010000000100000101000000011c000101010001010000010100000101b2
000101000001010100000123000001010000010100010123000001020000012100000101
00000101000201010001011c000001010001010000010101000001b50000010100000100
000001210000010000000100000001010001012200000102000001000000012000000101
00000101000201010001011c000001040000010100000100000001b30001010300010122
0002010100010122000001040001011f0000010100000101000201010001011c00000103
00010103000101b100010100000201000001011f00010100000201010001012100010101
000101000001011f0000010100000101000201010001011c000001020001010000020100
000101b00003010000000101000001200000010100000101000001000000012200010101
0000010100000120000001020000010000000101000001000000011d0000010100030100
00000101000001b700010122000101020001012400000102000101250001010200010127
000101ff01ff01ff01ff01ff01ff01ff01ff01ff01ff01ff01ff01010004010a0002010a
0001010b00020102000201000008010100020103000701000001010c0001010800030100
00010100000501ec0000010300000105000001000000010100000100000101090001010c
000101020001010200000101000101010001010100000105000101010000010300000118
00010100000101020001010100000106000001e300010103000001000002010100010101
000301010001010500020101000101010001010400020100000201020000010100010102
000001010000010500010101000201010000010100010101000101040005010500030103
00010101000001000001010000040101000101de00010106000401000001010000000100
000001000001010000000102000101000001010000010100000101000000010400020100
000201020000010100010102000001010000010500020102000001010000010000010100
000101000000010500000100000001000001010400030103000401010000010000000101
0000010100010100000001dd000101010002010100000101000001020000010000000100
000501020000010100010100000601040000010000000100000201020000010100010102
000001010000010000020101000101030000010100000100000601050000010000000100
0001010400010100000001030001010100010100000001000000010100000101000301dd
000101020001010100000101000001020000010000000101000101050000010100010100
000001020000010000010103000001000001010000010102000001010001010100010101
000001050001010300000101000001000000010200000100000101040000010000000100
00010104000101000001010200010101000101000002010100000101000001e100010101
000101010000010100010100000001010005010000000103000001000001010000010100
000101000001010300000100000101000001010200000101000101000001010200000105
000101030000010100000100000101000001010000010104000001000000010000010104
00010101000101010001010000010102000001020001010000010100000001e000010176
00000100000001ff0163000101ff01ff01ff01ff01ff01ff01ff01ff01ff01ff01ff018f

%%EndData
%%PageTrailer
%%Trailer
%%EOF