summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/prosper/img/arrow-glow.ps
blob: b0d0afc3179a053b3e1b7e05edc352bb62f397ac (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
%!PS-Adobe-2.0 EPSF-2.0
%%Title: /home/fred/TEMP/arrow.ps
%%Creator: XV Version 3.10a+FLmask  Rev: 12/29/94  -  by John Bradley
%%BoundingBox: 290 380 322 412
%%Pages: 1
%%DocumentFonts:
%%EndComments
%%EndProlog

%%Page: 1 1

% remember original state
/origstate save def

% build a temporary dictionary
20 dict begin

% define space for color conversions
/grays 32 string def  % space for gray scale line
/npixls 0 def
/rgbindx 0 def

% lower left corner
290 380 translate

% size of image (on paper, in 1/72inch coords)
31.96800 31.96800 scale

% define 'colorimage' if it isn't defined
%   ('colortogray' and 'mergeprocs' come from xwd2ps
%     via xgrab)
/colorimage where   % do we know about 'colorimage'?
  { pop }           % yes: pop off the 'dict' returned
  {                 % no:  define one
    /colortogray {  % define an RGB->I function
      /rgbdata exch store    % call input 'rgbdata'
      rgbdata length 3 idiv
      /npixls exch store
      /rgbindx 0 store
      0 1 npixls 1 sub {
        grays exch
        rgbdata rgbindx       get 20 mul    % Red
        rgbdata rgbindx 1 add get 32 mul    % Green
        rgbdata rgbindx 2 add get 12 mul    % Blue
        add add 64 idiv      % I = .5G + .31R + .18B
        put
        /rgbindx rgbindx 3 add store
      } for
      grays 0 npixls getinterval
    } bind def

    % Utility procedure for colorimage operator.
    % This procedure takes two procedures off the
    % stack and merges them into a single procedure.

    /mergeprocs { % def
      dup length
      3 -1 roll
      dup
      length
      dup
      5 1 roll
      3 -1 roll
      add
      array cvx
      dup
      3 -1 roll
      0 exch
      putinterval
      dup
      4 2 roll
      putinterval
    } bind def

    /colorimage { % def
      pop pop     % remove 'false 3' operands
      {colortogray} mergeprocs
      image
    } bind def
  } ifelse          % end of 'false' case



% define the colormap
/cmap 234 string def


% load up the colormap
currentfile cmap readhexstring
040204 145604 0c2e04 1c8204 343234 041a04 545654 1c6e04 0c4204 1c1a1c 
146204 249604 444644 042604 144e04 040e04 245a0c 2c2e2c 145e04 0c3a04 
248e04 1c4214 1c2a14 3c3e3c 042204 646264 1c7a04 144a04 1c6a04 24a204 
1c560c 1c3214 248a04 144204 1c6204 4c4e4c 142a14 041604 040a04 0c3604 
248604 3c3a3c 5c5e5c 1c7604 242224 249e04 0c2604 0c0e0c 2c2a2c 0c2204 
040604 145a04 0c3204 1c8604 343634 041e04 5c5a5c 1c7204 0c4604 1c1e1c 
146604 249a04 4c4a4c 145204 041204 1c5e04 0c3e04 249204 242624 444244 
646664 1c7e04 24a604 1c5a0c 144604 1c6604 545254 0c2a04 
pop pop   % lose return values from readhexstring


% rlecmapimage expects to have 'w h bits matrix' on stack
/rlecmapimage {
  /buffer 1 string def
  /rgbval 3 string def
  /block  384 string def

  % proc to read a block from file, and return RGB data
  { currentfile buffer readhexstring pop
    /bcount exch 0 get store
    bcount 128 ge
    {  % it's a non-run block
      0 1 bcount 128 sub
      { currentfile buffer readhexstring pop pop

        % look up value in color map
        /rgbval cmap buffer 0 get 3 mul 3 getinterval store

        % and put it in position i*3 in block
        block exch 3 mul rgbval putinterval
      } for
      block  0  bcount 127 sub 3 mul  getinterval
    }

    { % else it's a run block
      currentfile buffer readhexstring pop pop

      % look up value in colormap
      /rgbval cmap buffer 0 get 3 mul 3 getinterval store

      0 1 bcount { block exch 3 mul rgbval putinterval } for

      block 0 bcount 1 add 3 mul getinterval
    } ifelse
  } % end of proc
  false 3 colorimage
} bind def


32 32 8			% dimensions of data
[32 0 0 -32 0 32]		% mapping matrix
rlecmapimage

0126820f40258125058205254082400f268126328132000e00
822640058505372e0d2e188118058405400f26328132000d00
854025182e3427022787024d183705400f26822632000b00
8725184d27423a0e1b8a1b3a4227020d3705400f26822632000900
86374d273a3f120a010a8b33011b4227020d3705400f268126000800
97313408014b3122471a2b1c0a331b42274d0d3725400f26328132000500
984d130e0a2b2f091f0314351a073c011b42274d183725400f328132000400
9802213307032f092c091e140b201a070a011b42274d1805250f810f328132000200
87343a121a142f094495442c091e430b351a070a3f3a42340d1805400f2632000100
9e270e4b470b2f09440411443b091e430b351a1c0a3f4a13020d37250f2632000000
9f270e3c352d2f092c04293611303b094b1d43351a1c120e08342e37250f263200
9f273f07282d2f0944361745290411442c164b2d14033922013a274d37250f2632
9f133f3c201d2f092c0445230c45290430442c16223d351a3c013a270d05402632
9f133f07201d2f094436173e06230c45360430443b1641202b223f420218250f26
8b133f0735482f092c04452338933806230c17290430443b1f1c07334a270d254032
9f273f07201d2f0944361723384619384c3e0c173604112c3b243f3a272e054026
99133f0735482f092c044523382a384c230c45293611442c3b240e850e130d054026
91133f07201d2f0944041723064c230c1729048d04304409154b07333a342e050f26
8a130e0735482f094404452386230c45290411448d44094928352b0a0e420218250f26
9f133f3c202d2f094404450c17290430442c3b101443352b220108272e05402632
9f270e3c352d2f092c0417290430443b091e140b35471c123f08344d37250f2632
88270e3c280b2f094404960411443b161c1d0b3547394b011b42342e37250f263200
9d343a122b142f094430443b164b1d43201a393c013a0827020d37250f2632813200
9d02213339032f092c3b164b2d43281a070a011b0813022e3725400f2632000100
9a4d130e0a2b2f091f1c4314031a070a011b0827022e3705400f26328132000200
9818343a013c163c47031a391c123f1b42270d2e3725400f263201320400
95374d274a0112223c4b0a333f3a4227020d3125400f268126328132000500
8625310d27213a0e010e8a1b0813344d180525400f26822632000800
864005310d34271301138834020d2e3725400f26822632000a00
8d26402537182e0d2e0d183705250f810f268126328132000b00
0126830f402505010501250140820f26328132000e00
01320126020f81400f810f268126328132001000

%
% Compression made this file 31.80% of the uncompressed size.
%


showpage

% stop using temporary dictionary
end

% restore original state
origstate restore

%%Trailer