buildMatrix static method

void buildMatrix(
  1. BitArray dataBits,
  2. ErrorCorrectionLevel ecLevel,
  3. Version version,
  4. int maskPattern,
  5. ByteMatrix matrix,
)

Implementation

static void buildMatrix(
  BitArray dataBits,
  ErrorCorrectionLevel ecLevel,
  Version version,
  int maskPattern,
  ByteMatrix matrix,
) {
  clearMatrix(matrix);
  embedBasicPatterns(version, matrix);
  // Type information appear with any version.
  embedTypeInfo(ecLevel, maskPattern, matrix);
  // Version info appear if version >= 7.
  maybeEmbedVersionInfo(version, matrix);
  // Data should be embedded at end.
  embedDataBits(dataBits, maskPattern, matrix);
}