iTextSharp.text.pdf.qrcode.MatrixUtil.EmbedPositionAdjustmentPattern C# (CSharp) Метод

EmbedPositionAdjustmentPattern() приватный статический Метод

private static EmbedPositionAdjustmentPattern ( int xStart, int yStart, ByteMatrix matrix ) : void
xStart int
yStart int
matrix ByteMatrix
Результат void
        private static void EmbedPositionAdjustmentPattern(int xStart, int yStart,
            ByteMatrix matrix) {
            // We know the width and height.
            if (POSITION_ADJUSTMENT_PATTERN[0].Length != 5 || POSITION_ADJUSTMENT_PATTERN.GetLength(0) != 5) {
                throw new WriterException("Bad position adjustment");
            }
            for (int y = 0; y < 5; ++y) {
                for (int x = 0; x < 5; ++x) {
                    if (!IsEmpty(matrix.Get(xStart + x, yStart + y))) {
                        throw new WriterException();
                    }
                    matrix.Set(xStart + x, yStart + y, POSITION_ADJUSTMENT_PATTERN[y][x]);
                }
            }
        }