iTextSharp.text.pdf.BarcodeEAN.GetBarsEAN8 C# (CSharp) Метод

GetBarsEAN8() публичный статический Метод

public static GetBarsEAN8 ( string _code ) : byte[]
_code string
Результат byte[]
        public static byte[] GetBarsEAN8(string _code) {
            int[] code = new int[_code.Length];
            for (int k = 0; k < code.Length; ++k)
                code[k] = _code[k] - '0';
            byte[] bars = new byte[TOTALBARS_EAN8];
            int pb = 0;
            bars[pb++] = 1;
            bars[pb++] = 1;
            bars[pb++] = 1;
            for (int k = 0; k < 4; ++k) {
                int c = code[k];
                byte[] stripes = BARS[c];
                bars[pb++] = stripes[0];
                bars[pb++] = stripes[1];
                bars[pb++] = stripes[2];
                bars[pb++] = stripes[3];
            }
            bars[pb++] = 1;
            bars[pb++] = 1;
            bars[pb++] = 1;
            bars[pb++] = 1;
            bars[pb++] = 1;
            for (int k = 4; k < 8; ++k) {
                int c = code[k];
                byte[] stripes = BARS[c];
                bars[pb++] = stripes[0];
                bars[pb++] = stripes[1];
                bars[pb++] = stripes[2];
                bars[pb++] = stripes[3];
            }
            bars[pb++] = 1;
            bars[pb++] = 1;
            bars[pb++] = 1;
            return bars;
        }