Class QrCodeMaskPattern


public abstract class QrCodeMaskPattern
extends Object
Masks that are applied to QR codes to ensure that there are no regions with "structure" in them. Avoid accidentally having patterns that look like a finder pattern or alignment pattern.
  • Field Details

  • Constructor Details

    • QrCodeMaskPattern

      protected QrCodeMaskPattern​(int bits)
  • Method Details

    • values

      public static List<QrCodeMaskPattern> values()
    • apply

      public abstract int apply​(int row, int col, int bitValue)
      Applies the mask to the specified bit. grid coordinates are relative to top left corner (0,0)
      row - module row
      col - module column
      bitValue - value of the bit. 0 or 1
      value after masking has been applied
    • lookupMask

      public static QrCodeMaskPattern lookupMask​(int maskPattern)
    • lookupMask

      public static QrCodeMaskPattern lookupMask​(String maskPattern)
    • toString

      public String toString()
      toString in class Object