For help! Interleaved 2 of 5 print the code programming ideas (specific see the source code comments)
1, through strBarTable () read the code should be coded character set;
2, get text1 content, to determine whether a string contains illegal characters;
3, check code computing Function (according to my 3, 1 and the whole ten with and difference);
4, the mapping Function of interleaved 2 yards (using Line Function)
(1) the specified drawing starting point coordinates, unit conversion;
(2) to specify the width of the interleaved 2 yards wide and narrow units, as well as the height of barcode printing;
(3) to judge whether the interleaved 2 of 5 characters in the code number of the input is even, whether with check code and the calculation of the check code (calculated in Function calls to check code), the interleaved 2 yards of the correct characters;
(4) the first draw starting character "0000";
(5) through every two cycles, namely the interleaved 2 yards "+ odd even a" one cycle, to draw the bar code characters,
(1) through intIndex int_Index read even a (I)), and an odd number of bits (I + 1) characters in strBarTable index value;
(2) print artificial recognition character, first print the coded characters, and print an odd number of characters;
(3) by J loop has traversed the coded (article), and an odd number of bits (empty) the same binary code, respectively, to draw the even and odd bits of code, including narrow unit of "0", "1" for unit wide, the use of Line drawing function and then make the X coordinate offset corresponding strip width, and empty is directly to the width of the X coordinate offset corresponding,
(6) to draw the character "100",
5, call the mapping Function of interleaved 2 yards
(1) by clicking on the "generate" button the interleaved 2 of 5 characters in the code in the box to read;
(2) will read the value of the transmission, the Function calls to draw interleaved 2 yards began to draw the corresponding interleaved 2 yards,