Chris@441
|
1
|
Chris@441
|
2 #============================================================+
|
Chris@441
|
3 # File name : c128cobject.rb
|
Chris@441
|
4 # Begin : 2002-07-31
|
Chris@441
|
5 # Last Update : 2004-12-29
|
Chris@441
|
6 # Author : Karim Mribti [barcode@mribti.com]
|
Chris@441
|
7 # : Sam Michaels [swampgas@swampgas.org]
|
Chris@441
|
8 # : Nicola Asuni [info@tecnick.com]
|
Chris@441
|
9 # Version : 0.0.8a 2001-04-01 (original code)
|
Chris@441
|
10 # License : GNU LGPL (Lesser General Public License) 2.1
|
Chris@441
|
11 # http://www.gnu.org/copyleft/lesser.txt
|
Chris@441
|
12 # Source Code : http://www.mribti.com/barcode/
|
Chris@441
|
13 #
|
Chris@441
|
14 # Description : Code 128-C Barcode Render Class for PHP using
|
Chris@441
|
15 # the GD graphics library.
|
Chris@441
|
16 # Code 128-C is numeric only and provides the
|
Chris@441
|
17 # most efficiency.
|
Chris@441
|
18 #
|
Chris@441
|
19 # NOTE:
|
Chris@441
|
20 # This version contains changes by Nicola Asuni:
|
Chris@441
|
21 # - porting to Ruby
|
Chris@441
|
22 # - code style and formatting
|
Chris@441
|
23 # - automatic php documentation in PhpDocumentor Style
|
Chris@441
|
24 # (www.phpdoc.org)
|
Chris@441
|
25 # - minor bug fixing
|
Chris@441
|
26 #============================================================+
|
Chris@441
|
27
|
Chris@441
|
28 #
|
Chris@441
|
29 # Code 128-C Barcode Render Class for PHP using the GD graphics library.<br>
|
Chris@441
|
30 # Code 128-C is numeric only and provides the most efficiency.
|
Chris@441
|
31 # @author Karim Mribti, Nicola Asuni
|
Chris@441
|
32 # @name BarcodeObject
|
Chris@441
|
33 # @package com.tecnick.tcpdf
|
Chris@441
|
34 # @@version 0.0.8a 2001-04-01 (original code)
|
Chris@441
|
35 # @since 2001-03-25
|
Chris@441
|
36 # @license http://www.gnu.org/copyleft/lesser.html LGPL
|
Chris@441
|
37 #
|
Chris@441
|
38
|
Chris@441
|
39 #
|
Chris@441
|
40 # Code 128-C Barcode Render Class for PHP using the GD graphics library.<br>
|
Chris@441
|
41 # Code 128-C is numeric only and provides the most efficiency.
|
Chris@441
|
42 # @author Karim Mribti, Nicola Asuni
|
Chris@441
|
43 # @name BarcodeObject
|
Chris@441
|
44 # @package com.tecnick.tcpdf
|
Chris@441
|
45 # @@version 0.0.8a 2001-04-01 (original code)
|
Chris@441
|
46 # @since 2001-03-25
|
Chris@441
|
47 # @license http://www.gnu.org/copyleft/lesser.html LGPL
|
Chris@441
|
48 #
|
Chris@441
|
49 class C128CObject extends BarcodeObject {
|
Chris@441
|
50
|
Chris@441
|
51 #
|
Chris@441
|
52 # Class Constructor.
|
Chris@441
|
53 # @param int $Width Image width in pixels.
|
Chris@441
|
54 # @param int $Height Image height in pixels.
|
Chris@441
|
55 # @param int $Style Barcode style.
|
Chris@441
|
56 # @param int $Value value to print on barcode.
|
Chris@441
|
57 #
|
Chris@441
|
58 def __construct($Width, $Height, $Style, $Value)
|
Chris@441
|
59 parent::__construct($Width, $Height, $Style);
|
Chris@441
|
60 @mValue = $Value;
|
Chris@441
|
61 @mChars = array (
|
Chris@441
|
62 "00", "01", "02", "03", "04", "05", "06", "07", "08", "09",
|
Chris@441
|
63 "10", "11", "12", "13", "14", "15", "16", "17", "18", "19",
|
Chris@441
|
64 "20", "21", "22", "23", "24", "25", "26", "27", "28", "29",
|
Chris@441
|
65 "30", "31", "32", "33", "34", "35", "36", "37", "38", "39",
|
Chris@441
|
66 "40", "41", "42", "43", "44", "45", "46", "47", "48", "49",
|
Chris@441
|
67 "50", "51", "52", "53", "54", "55", "56", "57", "58", "59",
|
Chris@441
|
68 "60", "61", "62", "63", "64", "65", "66", "67", "68", "69",
|
Chris@441
|
69 "70", "71", "72", "73", "74", "75", "76", "77", "78", "79",
|
Chris@441
|
70 "80", "81", "82", "83", "84", "85", "86", "87", "88", "89",
|
Chris@441
|
71 "90", "91", "92", "93", "94", "95", "96", "97", "98", "99",
|
Chris@441
|
72 );
|
Chris@441
|
73 @mCharSet = array (
|
Chris@441
|
74 "212222", # 00#
|
Chris@441
|
75 "222122", # 01#
|
Chris@441
|
76 "222221", # 02#
|
Chris@441
|
77 "121223", # 03#
|
Chris@441
|
78 "121322", # 04#
|
Chris@441
|
79 "131222", # 05#
|
Chris@441
|
80 "122213", # 06#
|
Chris@441
|
81 "122312", # 07#
|
Chris@441
|
82 "132212", # 08#
|
Chris@441
|
83 "221213", # 09#
|
Chris@441
|
84 "221312", # 10#
|
Chris@441
|
85 "231212", # 11#
|
Chris@441
|
86 "112232", # 12#
|
Chris@441
|
87 "122132", # 13#
|
Chris@441
|
88 "122231", # 14#
|
Chris@441
|
89 "113222", # 15#
|
Chris@441
|
90 "123122", # 16#
|
Chris@441
|
91 "123221", # 17#
|
Chris@441
|
92 "223211", # 18#
|
Chris@441
|
93 "221132", # 19#
|
Chris@441
|
94 "221231", # 20#
|
Chris@441
|
95 "213212", # 21#
|
Chris@441
|
96 "223112", # 22#
|
Chris@441
|
97 "312131", # 23#
|
Chris@441
|
98 "311222", # 24#
|
Chris@441
|
99 "321122", # 25#
|
Chris@441
|
100 "321221", # 26#
|
Chris@441
|
101 "312212", # 27#
|
Chris@441
|
102 "322112", # 28#
|
Chris@441
|
103 "322211", # 29#
|
Chris@441
|
104 "212123", # 30#
|
Chris@441
|
105 "212321", # 31#
|
Chris@441
|
106 "232121", # 32#
|
Chris@441
|
107 "111323", # 33#
|
Chris@441
|
108 "131123", # 34#
|
Chris@441
|
109 "131321", # 35#
|
Chris@441
|
110 "112313", # 36#
|
Chris@441
|
111 "132113", # 37#
|
Chris@441
|
112 "132311", # 38#
|
Chris@441
|
113 "211313", # 39#
|
Chris@441
|
114 "231113", # 40#
|
Chris@441
|
115 "231311", # 41#
|
Chris@441
|
116 "112133", # 42#
|
Chris@441
|
117 "112331", # 43#
|
Chris@441
|
118 "132131", # 44#
|
Chris@441
|
119 "113123", # 45#
|
Chris@441
|
120 "113321", # 46#
|
Chris@441
|
121 "133121", # 47#
|
Chris@441
|
122 "313121", # 48#
|
Chris@441
|
123 "211331", # 49#
|
Chris@441
|
124 "231131", # 50#
|
Chris@441
|
125 "213113", # 51#
|
Chris@441
|
126 "213311", # 52#
|
Chris@441
|
127 "213131", # 53#
|
Chris@441
|
128 "311123", # 54#
|
Chris@441
|
129 "311321", # 55#
|
Chris@441
|
130 "331121", # 56#
|
Chris@441
|
131 "312113", # 57#
|
Chris@441
|
132 "312311", # 58#
|
Chris@441
|
133 "332111", # 59#
|
Chris@441
|
134 "314111", # 60#
|
Chris@441
|
135 "221411", # 61#
|
Chris@441
|
136 "431111", # 62#
|
Chris@441
|
137 "111224", # 63#
|
Chris@441
|
138 "111422", # 64#
|
Chris@441
|
139 "121124", # 65#
|
Chris@441
|
140 "121421", # 66#
|
Chris@441
|
141 "141122", # 67#
|
Chris@441
|
142 "141221", # 68#
|
Chris@441
|
143 "112214", # 69#
|
Chris@441
|
144 "112412", # 70#
|
Chris@441
|
145 "122114", # 71#
|
Chris@441
|
146 "122411", # 72#
|
Chris@441
|
147 "142112", # 73#
|
Chris@441
|
148 "142211", # 74#
|
Chris@441
|
149 "241211", # 75#
|
Chris@441
|
150 "221114", # 76#
|
Chris@441
|
151 "413111", # 77#
|
Chris@441
|
152 "241112", # 78#
|
Chris@441
|
153 "134111", # 79#
|
Chris@441
|
154 "111242", # 80#
|
Chris@441
|
155 "121142", # 81#
|
Chris@441
|
156 "121241", # 82#
|
Chris@441
|
157 "114212", # 83#
|
Chris@441
|
158 "124112", # 84#
|
Chris@441
|
159 "124211", # 85#
|
Chris@441
|
160 "411212", # 86#
|
Chris@441
|
161 "421112", # 87#
|
Chris@441
|
162 "421211", # 88#
|
Chris@441
|
163 "212141", # 89#
|
Chris@441
|
164 "214121", # 90#
|
Chris@441
|
165 "412121", # 91#
|
Chris@441
|
166 "111143", # 92#
|
Chris@441
|
167 "111341", # 93#
|
Chris@441
|
168 "131141", # 94#
|
Chris@441
|
169 "114113", # 95#
|
Chris@441
|
170 "114311", # 96#
|
Chris@441
|
171 "411113", # 97#
|
Chris@441
|
172 "411311", # 98#
|
Chris@441
|
173 "113141", # 99#
|
Chris@441
|
174 );
|
Chris@441
|
175 end
|
Chris@441
|
176
|
Chris@441
|
177 #
|
Chris@441
|
178 # Returns the character index.
|
Chris@441
|
179 # @param char $char character.
|
Chris@441
|
180 # @return int character index or -1 in case of error.
|
Chris@441
|
181 # @access private
|
Chris@441
|
182 #
|
Chris@441
|
183 def GetCharIndex($char)
|
Chris@441
|
184 for ($i=0;$i<100;$i++)
|
Chris@441
|
185 if (@mChars[$i] == $char)
|
Chris@441
|
186 return $i;
|
Chris@441
|
187 end
|
Chris@441
|
188 end
|
Chris@441
|
189 return -1;
|
Chris@441
|
190 end
|
Chris@441
|
191
|
Chris@441
|
192 #
|
Chris@441
|
193 # Returns the bar size.
|
Chris@441
|
194 # @param int $xres Horizontal resolution.
|
Chris@441
|
195 # @param char $char Character.
|
Chris@441
|
196 # @return int barcode size.
|
Chris@441
|
197 # @access private
|
Chris@441
|
198 #
|
Chris@441
|
199 def GetBarSize($xres, $char)
|
Chris@441
|
200 switch ($char)
|
Chris@441
|
201 case '1'
|
Chris@441
|
202 $cVal = BCD_C128_BAR_1;
|
Chris@441
|
203
|
Chris@441
|
204 case '2'
|
Chris@441
|
205 $cVal = BCD_C128_BAR_2;
|
Chris@441
|
206
|
Chris@441
|
207 case '3'
|
Chris@441
|
208 $cVal = BCD_C128_BAR_3;
|
Chris@441
|
209
|
Chris@441
|
210 case '4'
|
Chris@441
|
211 $cVal = BCD_C128_BAR_4;
|
Chris@441
|
212
|
Chris@441
|
213 default
|
Chris@441
|
214 $cVal = 0;
|
Chris@441
|
215 end
|
Chris@441
|
216 end
|
Chris@441
|
217 return $cVal# $xres;
|
Chris@441
|
218 end
|
Chris@441
|
219
|
Chris@441
|
220 #
|
Chris@441
|
221 # Returns barcode size.
|
Chris@441
|
222 # @param int $xres Horizontal resolution.
|
Chris@441
|
223 # @return barcode size.
|
Chris@441
|
224 # @access private
|
Chris@441
|
225 #
|
Chris@441
|
226 def GetSize($xres)
|
Chris@441
|
227 $len = @mValue.length;
|
Chris@441
|
228
|
Chris@441
|
229 if ($len == 0) {
|
Chris@441
|
230 @mError = "Null value";
|
Chris@441
|
231 return false;
|
Chris@441
|
232 end
|
Chris@441
|
233 $ret = 0;
|
Chris@441
|
234
|
Chris@441
|
235 for ($i=0;$i<$len;$i++)
|
Chris@441
|
236 if ((@mValue[$i][0] < 48) || (@mValue[$i][0] > 57))
|
Chris@441
|
237 @mError = "Code-128C is numeric only";
|
Chris@441
|
238 return false;
|
Chris@441
|
239 end
|
Chris@441
|
240 end
|
Chris@441
|
241
|
Chris@441
|
242 if (($len%2) != 0)
|
Chris@441
|
243 @mError = "The length of barcode value must be even. You must pad the number with zeros.";
|
Chris@441
|
244 return false;
|
Chris@441
|
245 end
|
Chris@441
|
246
|
Chris@441
|
247 for ($i=0;$i<$len;$i+=2)
|
Chris@441
|
248 $id = GetCharIndex(@mValue[$i].@mValue[$i+1]);
|
Chris@441
|
249 $cset = @mCharSet[$id];
|
Chris@441
|
250 $ret += GetBarSize($xres, $cset[0]);
|
Chris@441
|
251 $ret += GetBarSize($xres, $cset[1]);
|
Chris@441
|
252 $ret += GetBarSize($xres, $cset[2]);
|
Chris@441
|
253 $ret += GetBarSize($xres, $cset[3]);
|
Chris@441
|
254 $ret += GetBarSize($xres, $cset[4]);
|
Chris@441
|
255 $ret += GetBarSize($xres, $cset[5]);
|
Chris@441
|
256 end
|
Chris@441
|
257 # length of Check character#
|
Chris@441
|
258 $cset = GetCheckCharValue();
|
Chris@441
|
259 $CheckSize = 0;
|
Chris@441
|
260 for ($i=0;$i<6;$i++)
|
Chris@441
|
261 $CheckSize += GetBarSize($cset[$i], $xres);
|
Chris@441
|
262 end
|
Chris@441
|
263
|
Chris@441
|
264 $StartSize = 2*BCD_C128_BAR_2*$xres + 3*BCD_C128_BAR_1*$xres + BCD_C128_BAR_4*$xres;
|
Chris@441
|
265 $StopSize = 2*BCD_C128_BAR_2*$xres + 3*BCD_C128_BAR_1*$xres + 2*BCD_C128_BAR_3*$xres;
|
Chris@441
|
266 return $StartSize + $ret + $CheckSize + $StopSize;
|
Chris@441
|
267 end
|
Chris@441
|
268
|
Chris@441
|
269 #
|
Chris@441
|
270 # Returns the check-char value.
|
Chris@441
|
271 # @return string.
|
Chris@441
|
272 # @access private
|
Chris@441
|
273 #
|
Chris@441
|
274 def GetCheckCharValue()
|
Chris@441
|
275 $len = @mValue.length;
|
Chris@441
|
276 $sum = 105; # 'C' type;
|
Chris@441
|
277 $m = 0;
|
Chris@441
|
278 for ($i=0;$i<$len;$i+=2)
|
Chris@441
|
279 $m += 1;
|
Chris@441
|
280 $sum += GetCharIndex(@mValue[$i].@mValue[$i+1])# $m;
|
Chris@441
|
281 end
|
Chris@441
|
282 $check = $sum % 103;
|
Chris@441
|
283 return @mCharSet[$check];
|
Chris@441
|
284 end
|
Chris@441
|
285
|
Chris@441
|
286 #
|
Chris@441
|
287 # Draws the start code.
|
Chris@441
|
288 # @param int $DrawPos Drawing position.
|
Chris@441
|
289 # @param int $yPos Vertical position.
|
Chris@441
|
290 # @param int $ySize Vertical size.
|
Chris@441
|
291 # @param int $xres Horizontal resolution.
|
Chris@441
|
292 # @return int drawing position.
|
Chris@441
|
293 # @access private
|
Chris@441
|
294 #
|
Chris@441
|
295 def DrawStart($DrawPos, $yPos, $ySize, $xres)
|
Chris@441
|
296 # Start code is '211232'#
|
Chris@441
|
297 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('2', $xres) , $ySize);
|
Chris@441
|
298 $DrawPos += GetBarSize('2', $xres);
|
Chris@441
|
299 $DrawPos += GetBarSize('1', $xres);
|
Chris@441
|
300 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('1', $xres) , $ySize);
|
Chris@441
|
301 $DrawPos += GetBarSize('1', $xres);
|
Chris@441
|
302 $DrawPos += GetBarSize('2', $xres);
|
Chris@441
|
303 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('3', $xres) , $ySize);
|
Chris@441
|
304 $DrawPos += GetBarSize('3', $xres);
|
Chris@441
|
305 $DrawPos += GetBarSize('2', $xres);
|
Chris@441
|
306 return $DrawPos;
|
Chris@441
|
307 end
|
Chris@441
|
308
|
Chris@441
|
309 #
|
Chris@441
|
310 # Draws the stop code.
|
Chris@441
|
311 # @param int $DrawPos Drawing position.
|
Chris@441
|
312 # @param int $yPos Vertical position.
|
Chris@441
|
313 # @param int $ySize Vertical size.
|
Chris@441
|
314 # @param int $xres Horizontal resolution.
|
Chris@441
|
315 # @return int drawing position.
|
Chris@441
|
316 # @access private
|
Chris@441
|
317 #
|
Chris@441
|
318 def DrawStop($DrawPos, $yPos, $ySize, $xres)
|
Chris@441
|
319 # Stop code is '2331112'#
|
Chris@441
|
320 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('2', $xres) , $ySize);
|
Chris@441
|
321 $DrawPos += GetBarSize('2', $xres);
|
Chris@441
|
322 $DrawPos += GetBarSize('3', $xres);
|
Chris@441
|
323 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('3', $xres) , $ySize);
|
Chris@441
|
324 $DrawPos += GetBarSize('3', $xres);
|
Chris@441
|
325 $DrawPos += GetBarSize('1', $xres);
|
Chris@441
|
326 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('1', $xres) , $ySize);
|
Chris@441
|
327 $DrawPos += GetBarSize('1', $xres);
|
Chris@441
|
328 $DrawPos += GetBarSize('1', $xres);
|
Chris@441
|
329 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize('2', $xres) , $ySize);
|
Chris@441
|
330 $DrawPos += GetBarSize('2', $xres);
|
Chris@441
|
331 return $DrawPos;
|
Chris@441
|
332 end
|
Chris@441
|
333
|
Chris@441
|
334 #
|
Chris@441
|
335 # Draws the check-char code.
|
Chris@441
|
336 # @param int $DrawPos Drawing position.
|
Chris@441
|
337 # @param int $yPos Vertical position.
|
Chris@441
|
338 # @param int $ySize Vertical size.
|
Chris@441
|
339 # @param int $xres Horizontal resolution.
|
Chris@441
|
340 # @return int drawing position.
|
Chris@441
|
341 # @access private
|
Chris@441
|
342 #
|
Chris@441
|
343 def DrawCheckChar($DrawPos, $yPos, $ySize, $xres)
|
Chris@441
|
344 $cset = GetCheckCharValue();
|
Chris@441
|
345 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[0], $xres) , $ySize);
|
Chris@441
|
346 $DrawPos += GetBarSize($cset[0], $xres);
|
Chris@441
|
347 $DrawPos += GetBarSize($cset[1], $xres);
|
Chris@441
|
348 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[2], $xres) , $ySize);
|
Chris@441
|
349 $DrawPos += GetBarSize($cset[2], $xres);
|
Chris@441
|
350 $DrawPos += GetBarSize($cset[3], $xres);
|
Chris@441
|
351 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[4], $xres) , $ySize);
|
Chris@441
|
352 $DrawPos += GetBarSize($cset[4], $xres);
|
Chris@441
|
353 $DrawPos += GetBarSize($cset[5], $xres);
|
Chris@441
|
354 return $DrawPos;
|
Chris@441
|
355 end
|
Chris@441
|
356
|
Chris@441
|
357 #
|
Chris@441
|
358 # Draws the barcode object.
|
Chris@441
|
359 # @param int $xres Horizontal resolution.
|
Chris@441
|
360 # @return bool true in case of success.
|
Chris@441
|
361 #
|
Chris@441
|
362 def DrawObject($xres)
|
Chris@441
|
363 $len = @mValue.length;
|
Chris@441
|
364 if (($size = GetSize($xres))==0)
|
Chris@441
|
365 return false;
|
Chris@441
|
366 end
|
Chris@441
|
367
|
Chris@441
|
368 if (@mStyle & BCS_ALIGN_CENTER) $sPos = (integer)((@mWidth - $size ) / 2);
|
Chris@441
|
369 elsif (@mStyle & BCS_ALIGN_RIGHT) $sPos = @mWidth - $size;
|
Chris@441
|
370 else $sPos = 0;
|
Chris@441
|
371
|
Chris@441
|
372 # Total height of bar code -Bars only-#
|
Chris@441
|
373 if (@mStyle & BCS_DRAW_TEXT) $ysize = @mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2 - GetFontHeight(@mFont);
|
Chris@441
|
374 else $ysize = @mHeight - BCD_DEFAULT_MAR_Y1 - BCD_DEFAULT_MAR_Y2;
|
Chris@441
|
375
|
Chris@441
|
376 # Draw text#
|
Chris@441
|
377 if (@mStyle & BCS_DRAW_TEXT)
|
Chris@441
|
378 if (@mStyle & BCS_STRETCH_TEXT)
|
Chris@441
|
379 for ($i=0;$i<$len;$i++)
|
Chris@441
|
380 @DrawChar(@mFont, $sPos+(2*BCD_C128_BAR_2*$xres + 3*BCD_C128_BAR_1*$xres + BCD_C128_BAR_4*$xres)+($size/$len)*$i,
|
Chris@441
|
381 $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, @mValue[$i]);
|
Chris@441
|
382 else# Center#
|
Chris@441
|
383 $text_width = GetFontWidth(@mFont) * @mValue.length;
|
Chris@441
|
384 @DrawText(@mFont, $sPos+(($size-$text_width)/2)+(2*BCD_C128_BAR_2*$xres + 3*BCD_C128_BAR_1*$xres + BCD_C128_BAR_4*$xres),
|
Chris@441
|
385 $ysize + BCD_DEFAULT_MAR_Y1 + BCD_DEFAULT_TEXT_OFFSET, @mValue);
|
Chris@441
|
386 end
|
Chris@441
|
387 end
|
Chris@441
|
388
|
Chris@441
|
389 $cPos = 0;
|
Chris@441
|
390 $DrawPos = @DrawStart($sPos, BCD_DEFAULT_MAR_Y1 , $ysize, $xres);
|
Chris@441
|
391 do {
|
Chris@441
|
392 $c = GetCharIndex(@mValue[$cPos].@mValue[$cPos+1]);
|
Chris@441
|
393 $cset = @mCharSet[$c];
|
Chris@441
|
394 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[0], $xres) , $ysize);
|
Chris@441
|
395 $DrawPos += GetBarSize($cset[0], $xres);
|
Chris@441
|
396 $DrawPos += GetBarSize($cset[1], $xres);
|
Chris@441
|
397 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[2], $xres) , $ysize);
|
Chris@441
|
398 $DrawPos += GetBarSize($cset[2], $xres);
|
Chris@441
|
399 $DrawPos += GetBarSize($cset[3], $xres);
|
Chris@441
|
400 @DrawSingleBar($DrawPos, BCD_DEFAULT_MAR_Y1, GetBarSize($cset[4], $xres) , $ysize);
|
Chris@441
|
401 $DrawPos += GetBarSize($cset[4], $xres);
|
Chris@441
|
402 $DrawPos += GetBarSize($cset[5], $xres);
|
Chris@441
|
403 $cPos += 2;
|
Chris@441
|
404 end while ($cPos<$len);
|
Chris@441
|
405 $DrawPos = @DrawCheckChar($DrawPos, BCD_DEFAULT_MAR_Y1 , $ysize, $xres);
|
Chris@441
|
406 $DrawPos = @DrawStop($DrawPos, BCD_DEFAULT_MAR_Y1 , $ysize, $xres);
|
Chris@441
|
407 return true;
|
Chris@441
|
408 end
|
Chris@441
|
409 }
|
Chris@441
|
410
|
Chris@441
|
411 #============================================================+
|
Chris@441
|
412 # END OF FILE
|
Chris@441
|
413 #============================================================+
|
Chris@441
|
414
|