iTextSharp.text.pdf.BarcodeDatamatrix.Placement.Ecc200 C# (CSharp) Метод

Ecc200() приватный метод

private Ecc200 ( ) : void
Результат void
            private void Ecc200(){
                int row, col, chr;
                /* First, fill the array[] with invalid entries */
                for (int k = 0; k < array.Length; ++k)
                    array[k] = (short)0;
                /* Starting in the correct location for character #1, bit 8,... */
                chr = 1; row = 4; col = 0;
                do {
                    /* repeatedly first check for one of the special corner cases, then... */
                    if ((row == nrow) && (col == 0)) Corner1(chr++);
                    if ((row == nrow-2) && (col == 0) && (ncol%4 != 0)) Corner2(chr++);
                    if ((row == nrow-2) && (col == 0) && (ncol%8 == 4)) Corner3(chr++);
                    if ((row == nrow+4) && (col == 2) && (ncol%8 == 0)) Corner4(chr++);
                    /* sweep upward diagonally, inserting successive characters,... */
                    do {
                        if ((row < nrow) && (col >= 0) && array[row*ncol+col] == 0)
                            Utah(row,col,chr++);
                        row -= 2; col += 2;
                    } while ((row >= 0) && (col < ncol));
                    row += 1; col += 3;
                    /* & then sweep downward diagonally, inserting successive characters,... */

                    do {
                        if ((row >= 0) && (col < ncol) && array[row*ncol+col] == 0)
                            Utah(row,col,chr++);
                        row += 2; col -= 2;
                    } while ((row < nrow) && (col >= 0));
                    row += 3; col += 1;
                    /* ... until the entire array is scanned */
                } while ((row < nrow) || (col < ncol));
                /* Lastly, if the lower righthand corner is untouched, fill in fixed pattern */
                if (array[nrow*ncol-1] == 0) {
                    array[nrow*ncol-1] = array[nrow*ncol-ncol-2] = 1;
                }
            }
        }