rghost_barcode 0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/lib/doc/classes/RGhost.html +109 -0
  2. data/lib/doc/classes/RGhost/Barcode.html +147 -0
  3. data/lib/doc/classes/RGhost/Barcode/Auspost.html +113 -0
  4. data/lib/doc/classes/RGhost/Barcode/Azteccode.html +113 -0
  5. data/lib/doc/classes/RGhost/Barcode/Base.html +266 -0
  6. data/lib/doc/classes/RGhost/Barcode/Base.src/M000004.html +34 -0
  7. data/lib/doc/classes/RGhost/Barcode/Base.src/M000005.html +30 -0
  8. data/lib/doc/classes/RGhost/Barcode/Base.src/M000006.html +20 -0
  9. data/lib/doc/classes/RGhost/Barcode/Border.html +170 -0
  10. data/lib/doc/classes/RGhost/Barcode/Border.src/M000001.html +27 -0
  11. data/lib/doc/classes/RGhost/Barcode/Code11.html +113 -0
  12. data/lib/doc/classes/RGhost/Barcode/Code128.html +113 -0
  13. data/lib/doc/classes/RGhost/Barcode/Code2of5.html +113 -0
  14. data/lib/doc/classes/RGhost/Barcode/Code39.html +113 -0
  15. data/lib/doc/classes/RGhost/Barcode/Code93.html +113 -0
  16. data/lib/doc/classes/RGhost/Barcode/Datamatrix.html +113 -0
  17. data/lib/doc/classes/RGhost/Barcode/Ean13.html +113 -0
  18. data/lib/doc/classes/RGhost/Barcode/Ean2.html +113 -0
  19. data/lib/doc/classes/RGhost/Barcode/Ean5.html +113 -0
  20. data/lib/doc/classes/RGhost/Barcode/Ean8.html +113 -0
  21. data/lib/doc/classes/RGhost/Barcode/Guard.html +174 -0
  22. data/lib/doc/classes/RGhost/Barcode/Guard.src/M000003.html +27 -0
  23. data/lib/doc/classes/RGhost/Barcode/Interleaved2of5.html +113 -0
  24. data/lib/doc/classes/RGhost/Barcode/Isbn.html +113 -0
  25. data/lib/doc/classes/RGhost/Barcode/Kix.html +113 -0
  26. data/lib/doc/classes/RGhost/Barcode/Maxicode.html +113 -0
  27. data/lib/doc/classes/RGhost/Barcode/Msi.html +113 -0
  28. data/lib/doc/classes/RGhost/Barcode/Onecode.html +113 -0
  29. data/lib/doc/classes/RGhost/Barcode/Parameter.html +262 -0
  30. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000007.html +20 -0
  31. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000008.html +18 -0
  32. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000009.html +18 -0
  33. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000010.html +18 -0
  34. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000011.html +18 -0
  35. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000012.html +24 -0
  36. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000013.html +18 -0
  37. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000014.html +18 -0
  38. data/lib/doc/classes/RGhost/Barcode/Parameter.src/M000015.html +16 -0
  39. data/lib/doc/classes/RGhost/Barcode/Pdf417.html +113 -0
  40. data/lib/doc/classes/RGhost/Barcode/Pharmacode.html +113 -0
  41. data/lib/doc/classes/RGhost/Barcode/Plessey.html +113 -0
  42. data/lib/doc/classes/RGhost/Barcode/Postnet.html +113 -0
  43. data/lib/doc/classes/RGhost/Barcode/Qrcode.html +113 -0
  44. data/lib/doc/classes/RGhost/Barcode/Rationalizedcodabar.html +113 -0
  45. data/lib/doc/classes/RGhost/Barcode/Raw.html +113 -0
  46. data/lib/doc/classes/RGhost/Barcode/Royalmail.html +113 -0
  47. data/lib/doc/classes/RGhost/Barcode/Rss14.html +113 -0
  48. data/lib/doc/classes/RGhost/Barcode/Rssexpanded.html +113 -0
  49. data/lib/doc/classes/RGhost/Barcode/Rsslimited.html +113 -0
  50. data/lib/doc/classes/RGhost/Barcode/Symbol.html +113 -0
  51. data/lib/doc/classes/RGhost/Barcode/Text.html +193 -0
  52. data/lib/doc/classes/RGhost/Barcode/Text.src/M000002.html +30 -0
  53. data/lib/doc/classes/RGhost/Barcode/Upca.html +113 -0
  54. data/lib/doc/classes/RGhost/Barcode/Upce.html +113 -0
  55. data/lib/doc/classes/RGhost/Config.html +150 -0
  56. data/lib/doc/classes/RGhost/Config.src/M000016.html +45 -0
  57. data/lib/doc/classes/RGhost/Document.html +704 -0
  58. data/lib/doc/classes/RGhost/Document.src/M000017.html +19 -0
  59. data/lib/doc/classes/RGhost/Document.src/M000018.html +18 -0
  60. data/lib/doc/classes/RGhost/Document.src/M000019.html +18 -0
  61. data/lib/doc/classes/RGhost/Document.src/M000020.html +18 -0
  62. data/lib/doc/classes/RGhost/Document.src/M000021.html +18 -0
  63. data/lib/doc/classes/RGhost/Document.src/M000022.html +18 -0
  64. data/lib/doc/classes/RGhost/Document.src/M000023.html +18 -0
  65. data/lib/doc/classes/RGhost/Document.src/M000024.html +18 -0
  66. data/lib/doc/classes/RGhost/Document.src/M000025.html +18 -0
  67. data/lib/doc/classes/RGhost/Document.src/M000026.html +18 -0
  68. data/lib/doc/classes/RGhost/Document.src/M000027.html +18 -0
  69. data/lib/doc/classes/RGhost/Document.src/M000028.html +18 -0
  70. data/lib/doc/classes/RGhost/Document.src/M000029.html +18 -0
  71. data/lib/doc/classes/RGhost/Document.src/M000030.html +18 -0
  72. data/lib/doc/classes/RGhost/Document.src/M000031.html +18 -0
  73. data/lib/doc/classes/RGhost/Document.src/M000032.html +18 -0
  74. data/lib/doc/classes/RGhost/Document.src/M000033.html +18 -0
  75. data/lib/doc/classes/RGhost/Document.src/M000034.html +18 -0
  76. data/lib/doc/classes/RGhost/Document.src/M000035.html +18 -0
  77. data/lib/doc/classes/RGhost/Document.src/M000036.html +18 -0
  78. data/lib/doc/classes/RGhost/Document.src/M000037.html +18 -0
  79. data/lib/doc/classes/RGhost/Document.src/M000038.html +18 -0
  80. data/lib/doc/classes/RGhost/Document.src/M000039.html +18 -0
  81. data/lib/doc/classes/RGhost/Document.src/M000040.html +18 -0
  82. data/lib/doc/classes/RGhost/Document.src/M000041.html +18 -0
  83. data/lib/doc/classes/RGhost/Document.src/M000042.html +18 -0
  84. data/lib/doc/classes/RGhost/Document.src/M000043.html +18 -0
  85. data/lib/doc/classes/RGhost/Document.src/M000044.html +18 -0
  86. data/lib/doc/classes/RGhost/Document.src/M000045.html +18 -0
  87. data/lib/doc/classes/RGhost/Document.src/M000046.html +18 -0
  88. data/lib/doc/classes/RGhost/Document.src/M000047.html +18 -0
  89. data/lib/doc/classes/RGhost/Document.src/M000048.html +18 -0
  90. data/lib/doc/created.rid +1 -0
  91. data/lib/doc/files/rghost_barcode/rghost_barcode_adapter_rb.html +101 -0
  92. data/lib/doc/files/rghost_barcode/rghost_barcode_base_rb.html +101 -0
  93. data/lib/doc/files/rghost_barcode/rghost_barcode_classes_rb.html +101 -0
  94. data/lib/doc/files/rghost_barcode/rghost_barcode_examples_rb.html +101 -0
  95. data/lib/doc/files/rghost_barcode/rghost_barcode_version_rb.html +101 -0
  96. data/lib/doc/files/rghost_barcode_rb.html +111 -0
  97. data/lib/doc/files/teste_main_rb.html +110 -0
  98. data/lib/doc/fr_class_index.html +67 -0
  99. data/lib/doc/fr_file_index.html +33 -0
  100. data/lib/doc/fr_method_index.html +74 -0
  101. data/lib/doc/index.html +24 -0
  102. data/lib/rghost_barcode.rb +7 -0
  103. data/lib/rghost_barcode/ps/auspost.ps +192 -0
  104. data/lib/rghost_barcode/ps/azteccode.ps +357 -0
  105. data/lib/rghost_barcode/ps/barcode_template.eps +1193 -0
  106. data/lib/rghost_barcode/ps/code11.ps +128 -0
  107. data/lib/rghost_barcode/ps/code128.ps +121 -0
  108. data/lib/rghost_barcode/ps/code2of5.ps +106 -0
  109. data/lib/rghost_barcode/ps/code39.ps +109 -0
  110. data/lib/rghost_barcode/ps/code93.ps +117 -0
  111. data/lib/rghost_barcode/ps/datamatrix.ps +328 -0
  112. data/lib/rghost_barcode/ps/ean13.ps +183 -0
  113. data/lib/rghost_barcode/ps/ean2.ps +101 -0
  114. data/lib/rghost_barcode/ps/ean5.ps +116 -0
  115. data/lib/rghost_barcode/ps/ean8.ps +101 -0
  116. data/lib/rghost_barcode/ps/interleaved2of5.ps +132 -0
  117. data/lib/rghost_barcode/ps/isbn.ps +118 -0
  118. data/lib/rghost_barcode/ps/kix.ps +98 -0
  119. data/lib/rghost_barcode/ps/maxicode.ps +307 -0
  120. data/lib/rghost_barcode/ps/msi.ps +104 -0
  121. data/lib/rghost_barcode/ps/onecode.ps +276 -0
  122. data/lib/rghost_barcode/ps/pdf417.ps +428 -0
  123. data/lib/rghost_barcode/ps/pharmacode.ps +69 -0
  124. data/lib/rghost_barcode/ps/plessey.ps +121 -0
  125. data/lib/rghost_barcode/ps/postnet.ps +114 -0
  126. data/lib/rghost_barcode/ps/qrcode.ps +530 -0
  127. data/lib/rghost_barcode/ps/rationalizedcodabar.ps +117 -0
  128. data/lib/rghost_barcode/ps/raw.ps +35 -0
  129. data/lib/rghost_barcode/ps/render.ps +307 -0
  130. data/lib/rghost_barcode/ps/render.ps~ +308 -0
  131. data/lib/rghost_barcode/ps/royalmail.ps +119 -0
  132. data/lib/rghost_barcode/ps/rss14.ps +237 -0
  133. data/lib/rghost_barcode/ps/rssexpanded.ps +211 -0
  134. data/lib/rghost_barcode/ps/rsslimited.ps +191 -0
  135. data/lib/rghost_barcode/ps/symbol.ps +49 -0
  136. data/lib/rghost_barcode/ps/upca.ps +128 -0
  137. data/lib/rghost_barcode/ps/upce.ps +157 -0
  138. data/lib/rghost_barcode/rghost_barcode_adapter.rb +249 -0
  139. data/lib/rghost_barcode/rghost_barcode_base.rb +210 -0
  140. data/lib/rghost_barcode/rghost_barcode_classes.rb +96 -0
  141. data/lib/rghost_barcode/rghost_barcode_examples.rb +35 -0
  142. data/lib/rghost_barcode/rghost_barcode_version.rb +8 -0
  143. data/lib/teste_main.rb +94 -0
  144. metadata +218 -0
@@ -0,0 +1,117 @@
1
+
2
+ % --DESC: Rationalized Codabar
3
+ % --EXAM: A0123456789B
4
+ % --EXOP: includetext includecheck includecheckintext
5
+ % --RNDR: renlinear
6
+ /rationalizedcodabar {
7
+
8
+ 0 begin % Confine variables to local scope
9
+
10
+ /options exch def % We are given an option string
11
+ /useropts options def
12
+ /barcode exch def % We are given a barcode string
13
+
14
+ /includecheck false def % Enable/disable checkdigit
15
+ /includetext false def % Enable/disable text
16
+ /includecheckintext false def
17
+ /textfont /Courier def
18
+ /textsize 10 def
19
+ /textyoffset -7 def
20
+ /height 1 def
21
+
22
+ % Parse the input options
23
+ options {
24
+ token false eq {exit} if dup length string cvs (=) search
25
+ true eq {cvlit exch pop exch def} {cvlit true def} ifelse
26
+ } loop
27
+
28
+ /textfont textfont cvlit def
29
+ /textsize textsize cvr def
30
+ /textyoffset textyoffset cvr def
31
+ /height height cvr def
32
+
33
+ % Create an array containing the character mappings
34
+ /encs
35
+ [ (11111331) (11113311) (11131131) (33111111) (11311311)
36
+ (31111311) (13111131) (13113111) (13311111) (31131111)
37
+ (11133111) (11331111) (31113131) (31311131) (31313111)
38
+ (11313131) (11331311) (13131131) (11131331) (11133311)
39
+ ] def
40
+
41
+ % Create a string of the available characters
42
+ /barchars (0123456789-$:/.+ABCD) def
43
+
44
+ /barlen barcode length def % Length of the code
45
+
46
+ includecheck {
47
+ /sbs barlen 8 mul 8 add string def
48
+ /txt barlen 1 add array def
49
+ } {
50
+ /sbs barlen 8 mul string def
51
+ /txt barlen array def
52
+ } ifelse
53
+
54
+ /checksum 0 def
55
+ /xpos 0 def
56
+ 0 1 barlen 2 sub {
57
+ /i exch def
58
+ % Lookup the encoding for the each barcode character
59
+ barcode i 1 getinterval barchars exch search
60
+ pop % Discard true leaving pre
61
+ length /indx exch def % indx is the length of pre
62
+ pop pop % Discard seek and post
63
+ /enc encs indx get def % Get the indxth encoding
64
+ sbs i 8 mul enc putinterval % Put encoded digit into sbs
65
+ txt i [barcode i 1 getinterval xpos textyoffset textfont textsize] put
66
+ 0 1 7 { % xpos+=width of the character
67
+ /xpos exch enc exch get 48 sub xpos add def
68
+ } for
69
+ /checksum checksum indx add def
70
+ } for
71
+
72
+ % Find index of last character
73
+ barcode barlen 1 sub 1 getinterval barchars exch search
74
+ pop % Discard true leaving pre
75
+ length /indx exch def % indx is the length of pre
76
+ pop pop % Discard seek and post
77
+
78
+ includecheck {
79
+ % Put the checksum character
80
+ /checksum checksum indx add def
81
+ /checksum 16 checksum 16 mod sub 16 mod def
82
+ sbs barlen 8 mul 8 sub encs checksum get putinterval
83
+ includecheckintext {
84
+ txt barlen 1 sub [barchars checksum 1 getinterval xpos textyoffset textfont textsize] put
85
+ } {
86
+ txt barlen 1 sub [( ) xpos textyoffset textfont textsize] put
87
+ } ifelse
88
+ 0 1 7 { % xpos+=width of the character
89
+ /xpos exch encs checksum get exch get 48 sub xpos add def
90
+ } for
91
+ % Put the end character
92
+ /enc encs indx get def % Get the indxth encoding
93
+ sbs barlen 8 mul enc putinterval % Put encoded digit into sbs
94
+ txt barlen [barcode barlen 1 sub 1 getinterval xpos textyoffset textfont textsize] put
95
+ } {
96
+ % Put the end character
97
+ /enc encs indx get def % Get the indxth encoding
98
+ sbs barlen 8 mul 8 sub enc putinterval % Put encoded digit into sbs
99
+ txt barlen 1 sub [barcode barlen 1 sub 1 getinterval xpos textyoffset textfont textsize] put
100
+ } ifelse
101
+
102
+ % Return the arguments
103
+ /retval 8 dict def
104
+ retval (ren) (renlinear) put
105
+ retval (sbs) [sbs {48 sub} forall] put
106
+ retval (bhs) [sbs length 1 add 2 idiv {height} repeat] put
107
+ retval (bbs) [sbs length 1 add 2 idiv {0} repeat] put
108
+ includetext {
109
+ retval (txt) txt put
110
+ } if
111
+ retval (opt) useropts put
112
+ retval
113
+
114
+ end
115
+
116
+ } bind def
117
+ /rationalizedcodabar load 0 1 dict put
@@ -0,0 +1,35 @@
1
+
2
+ % --DESC: Raw bar space succession for custom symbologies
3
+ % --EXAM: 331132131313411122131311333213114131131221323
4
+ % --EXOP: height=0.5
5
+ % --RNDR: renlinear
6
+ /raw {
7
+
8
+ 0 begin % Confine variables to local scope
9
+
10
+ /options exch def % We are given an option string
11
+ /useropts options def
12
+ /sbs exch def % We are given a barcode string
13
+
14
+ /height 1 def
15
+
16
+ % Parse the input options
17
+ options {
18
+ token false eq {exit} if dup length string cvs (=) search
19
+ true eq {cvlit exch pop exch def} {cvlit true def} ifelse
20
+ } loop
21
+ /height height cvr def
22
+
23
+ % Return the arguments
24
+ /retval 8 dict def
25
+ retval (ren) (renlinear) put
26
+ retval (sbs) [sbs {48 sub} forall] put
27
+ retval (bhs) [sbs length 1 add 2 idiv {height} repeat] put
28
+ retval (bbs) [sbs length 1 add 2 idiv {0} repeat] put
29
+ retval (opt) useropts put
30
+ retval
31
+
32
+ end
33
+
34
+ } bind def
35
+ /raw load 0 1 dict put
@@ -0,0 +1,307 @@
1
+ % --BEGIN RENDERER renlinear--
2
+ /renlinear {
3
+
4
+ 0 begin % Confine variables to local scope
5
+
6
+ /args exch def % We are given some arguments
7
+
8
+ % Default options
9
+ /sbs [] def
10
+ /bhs [] def
11
+ /bbs [] def
12
+ /txt [] def
13
+ /barcolor (unset) def
14
+ /includetext false def
15
+ /textcolor (unset) def
16
+ /textxalign (unset) def
17
+ /textyalign (unset) def
18
+ /textfont (Courier) def
19
+ /textsize 10 def
20
+ /textxoffset 0 def
21
+ /textyoffset 0 def
22
+ /bordercolor (unset) def
23
+ /backgroundcolor (unset) def
24
+ /inkspread 0.15 def
25
+ /width 0 def
26
+ /barratio 1 def
27
+ /spaceratio 1 def
28
+ /showborder false def
29
+ /borderleft 10 def
30
+ /borderright 10 def
31
+ /bordertop 1 def
32
+ /borderbottom 1 def
33
+ /borderwidth 0.5 def
34
+ /guardwhitespace false def
35
+ /guardleftpos 0 def
36
+ /guardleftypos 0 def
37
+ /guardrightpos 0 def
38
+ /guardrightypos 0 def
39
+ /guardwidth 6 def
40
+ /guardheight 7 def
41
+
42
+ % Apply the renderer options
43
+ args {exch cvlit exch def} forall
44
+
45
+ % Parse the user options
46
+ opt {
47
+ token false eq {exit} if dup length string cvs (=) search
48
+ true eq {cvlit exch pop exch def} {cvlit true def} ifelse
49
+ } loop
50
+
51
+ /barcolor barcolor cvlit def
52
+ /textcolor textcolor cvlit def
53
+ /textxalign textxalign cvlit def
54
+ /textyalign textyalign cvlit def
55
+ /textfont textfont cvlit def
56
+ /textsize textsize cvr def
57
+ /textxoffset textxoffset cvr def
58
+ /textyoffset textyoffset cvr def
59
+ /bordercolor bordercolor cvlit def
60
+ /backgroundcolor backgroundcolor cvlit def
61
+ /inkspread inkspread cvr def
62
+ /width width cvr def
63
+ /barratio barratio cvr def
64
+ /spaceratio spaceratio cvr def
65
+ /borderleft borderleft cvr def
66
+ /borderright borderright cvr def
67
+ /bordertop bordertop cvr def
68
+ /borderbottom borderbottom cvr def
69
+ /borderwidth borderwidth cvr def
70
+ /guardleftpos guardleftpos cvr def
71
+ /guardleftypos guardleftypos cvr def
72
+ /guardrightpos guardrightpos cvr def
73
+ /guardrightypos guardrightypos cvr def
74
+ /guardwidth guardwidth cvr def
75
+ /guardheight guardheight cvr def
76
+
77
+ % Create bar elements and put them into the bars array
78
+ /bars sbs length 1 add 2 idiv array def
79
+ /x 0.00 def /maxh 0 def
80
+ 0 1 sbs length 1 add 2 idiv 2 mul 2 sub {
81
+ /i exch def
82
+ i 2 mod 0 eq { % i is even
83
+ /d sbs i get barratio mul barratio sub 1 add def % d=digit*r-r+1
84
+ /h bhs i 2 idiv get 72 mul def % Height from bhs
85
+ /c d 2 div x add def % Centre of the bar = x + d/2
86
+ /y bbs i 2 idiv get 72 mul def % Baseline from bbs
87
+ /w d inkspread sub def % bar width = digit - inkspread
88
+ bars i 2 idiv [h c y w] put % Add the bar entry
89
+ h maxh gt {/maxh h def} if
90
+ } {
91
+ /d sbs i get spaceratio mul spaceratio sub 1 add def % d=digit*r-r+1
92
+ } ifelse
93
+ /x x d add def % x+=d
94
+ } for
95
+
96
+ gsave
97
+
98
+ currentpoint translate
99
+
100
+ % Force symbol to given width
101
+ width 0 ne {
102
+ width 72 mul x div 1 scale
103
+ } if
104
+
105
+ % Set RGB or CMYK color depending on length of given hex string
106
+ /setanycolor {
107
+ /anycolor exch def
108
+ anycolor length 6 eq {
109
+ (< >) 8 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setrgbcolor
110
+ } if
111
+ anycolor length 8 eq {
112
+ (< >) 10 string copy dup 1 anycolor putinterval cvx exec {255 div} forall setcmykcolor
113
+ } if
114
+ } bind def
115
+
116
+ % Display the border and background
117
+ newpath
118
+ borderleft neg borderbottom neg moveto
119
+ x borderleft add borderright add 0 rlineto
120
+ 0 maxh borderbottom add bordertop add rlineto
121
+ x borderleft add borderright add neg 0 rlineto
122
+ 0 maxh borderbottom add bordertop add neg rlineto
123
+ closepath
124
+ backgroundcolor (unset) ne { gsave backgroundcolor setanycolor fill grestore } if
125
+ showborder {
126
+ gsave
127
+ bordercolor (unset) ne { bordercolor setanycolor } if
128
+ borderwidth setlinewidth stroke
129
+ grestore
130
+ } if
131
+
132
+ % Display the bars for elements in the bars array
133
+ gsave
134
+ barcolor (unset) ne { barcolor setanycolor } if
135
+ bars {
136
+ {} forall
137
+ newpath setlinewidth moveto 0 exch rlineto stroke
138
+ } forall
139
+ grestore
140
+
141
+ % Display the text for elements in the text array
142
+ textcolor (unset) ne { textcolor setanycolor } if
143
+ includetext {
144
+ textxalign (unset) eq textyalign (unset) eq and {
145
+ /s 0 def /f () def
146
+ txt {
147
+ {} forall
148
+ 2 copy s ne exch f ne or {
149
+ 2 copy /s exch def /f exch def
150
+ exch findfont exch scalefont setfont
151
+ } {
152
+ pop pop
153
+ } ifelse
154
+ moveto show
155
+ } forall
156
+ } {
157
+ textfont findfont textsize scalefont setfont
158
+ /txt [ txt { 0 get {} forall } forall ] def
159
+ /tstr txt length string def
160
+ 0 1 txt length 1 sub { dup txt exch get tstr 3 1 roll put } for
161
+ /textxpos textxoffset x tstr stringwidth pop sub 2 div add def
162
+ textxalign (left) eq { /textxpos textxoffset def } if
163
+ textxalign (right) eq { /textxpos x textxoffset sub tstr stringwidth pop sub def } if
164
+ textxalign (offleft) eq { /textxpos tstr stringwidth pop textxoffset add neg def } if
165
+ textxalign (offright) eq { /textxpos x textxoffset add def } if
166
+ /textypos textyoffset textsize add 3 sub neg def
167
+ textyalign (above) eq { /textypos textyoffset maxh add 1 add def } if
168
+ textyalign (center) eq { /textypos textyoffset maxh textsize 4 sub sub 2 div add def } if
169
+ textxpos textypos moveto tstr show
170
+ } ifelse
171
+ } if
172
+
173
+ % Display the guard elements
174
+ guardwhitespace {
175
+ 0.75 setlinewidth
176
+ guardleftpos 0 ne {
177
+ newpath
178
+ guardleftpos neg guardwidth add guardleftypos guardwidth 2 div add moveto
179
+ guardwidth neg guardheight -2 div rlineto
180
+ guardwidth guardheight -2 div rlineto
181
+ stroke
182
+ } if
183
+ guardrightpos 0 ne {
184
+ newpath
185
+ guardrightpos x add guardwidth sub guardrightypos guardheight 2 div add moveto
186
+ guardwidth guardheight -2 div rlineto
187
+ guardwidth neg guardheight -2 div rlineto
188
+ stroke
189
+ } if
190
+ } if
191
+
192
+ grestore
193
+
194
+ end
195
+
196
+ } bind def
197
+ /renlinear load 0 1 dict put
198
+ % --END RENDERER renlinear--
199
+
200
+ % --BEGIN RENDERER renmatrix--
201
+ /renmatrix {
202
+
203
+ 0 begin
204
+
205
+ /args exch def
206
+
207
+ % Default options
208
+ /width 1 def
209
+ /height 1 def
210
+
211
+ % Apply the renderer options
212
+ args {exch cvlit exch def} forall
213
+
214
+ % Parse the user options
215
+ opt {
216
+ token false eq {exit} if dup length string cvs (=) search
217
+ true eq {cvlit exch pop exch def} {cvlit true def} ifelse
218
+ } loop
219
+
220
+ /width width cvr def
221
+ /height height cvr def
222
+
223
+ % Convert the bits into a string
224
+ /imgstr pixs length string def
225
+ 0 1 pixs length 1 sub {
226
+ dup imgstr 3 1 roll pixs exch get 1 exch sub 255 mul put
227
+ } for
228
+
229
+ % Draw the image
230
+ gsave
231
+ currentpoint translate
232
+ 72 width mul 72 height mul scale
233
+ pixx pixy 8 [ pixx 0 0 pixy neg 0 pixy ] {imgstr} image
234
+ grestore
235
+
236
+ end
237
+
238
+ } bind def
239
+ /renmatrix load 0 1 dict put
240
+ % --END RENDERER renmatrix--
241
+
242
+ % --BEGIN RENDERER renmaximatrix--
243
+ /renmaximatrix {
244
+
245
+ 0 begin
246
+
247
+ /args exch def % We are given some arguments
248
+
249
+ % Apply the renderer options
250
+ args {exch cvlit exch def} forall
251
+
252
+ % Parse the user options
253
+ opt {
254
+ token false eq {exit} if dup length string cvs (=) search
255
+ true eq {cvlit exch pop exch def} {cvlit true def} ifelse
256
+ } loop
257
+
258
+ gsave
259
+
260
+ currentpoint translate
261
+
262
+ 2.4945 dup scale % from 1pt to 1.88mm
263
+ 0.5 0.5774 translate
264
+
265
+ pixs {
266
+ dup
267
+ /x exch 30 mod def
268
+ /y exch 30 idiv def
269
+ y 2 mod 0 eq {x} {x 0.5 add} ifelse
270
+ 32 y sub 0.8661 mul
271
+ moveto
272
+ 0 0.5774 rmoveto
273
+ -0.5 -0.2887 rlineto
274
+ 0 -0.5774 rlineto
275
+ 0.5 -0.2887 rlineto
276
+ 0.5 0.2887 rlineto
277
+ 0 0.5774 rlineto
278
+ -0.5 0.2887 rlineto
279
+ closepath fill
280
+ } forall
281
+
282
+ % Plot the locator symbol
283
+ newpath 14 13.8576 0.5774 0 360 arc closepath
284
+ 14 13.8576 1.3359 360 0 arcn closepath fill
285
+ newpath 14 13.8576 2.1058 0 360 arc closepath
286
+ 14 13.8576 2.8644 360 0 arcn closepath fill
287
+ newpath 14 13.8576 3.6229 0 360 arc closepath
288
+ 14 13.8576 4.3814 360 0 arcn closepath fill
289
+
290
+ grestore
291
+
292
+ end
293
+
294
+ } bind def
295
+ /renmaximatrix load 0 1 dict put
296
+ % --END RENDERER renmaximatrix--
297
+
298
+ % --BEGIN DISPATCHER--
299
+ /barcode {
300
+ 0 begin
301
+ dup (ren) get cvx exec
302
+ end
303
+ } bind def
304
+ /barcode load 0 1 dict put
305
+ % --END DISPATCHER--
306
+
307
+