Class QRWriter

java.lang.Object
org.enkatsu.zxingp5.QRWriter

public class QRWriter extends Object
  • Field Details

  • Constructor Details

    • QRWriter

      public QRWriter(processing.core.PApplet app)
      Parameters:
      app - A PApplet representing the user sketch, i.e "this"
  • Method Details

    • getImage

      public processing.core.PImage getImage(int width, int height)
      Parameters:
      width - int
      height - int
      Returns:
      Encoded QR code image.
    • getQRCode

      public QRCode getQRCode(int width, int height)
      Parameters:
      width - int
      height - int
      Returns:
      Encoded QR code instance.
    • encode

      public boolean[][] encode(String src, com.google.zxing.BarcodeFormat format, int width, int height)
      Parameters:
      src - Text to encode into QR code
      format - Barcode format, i.e "BarcodeFormat.QR_CODE"
      width - int
      height - int
      Returns:
      Bits from encoded QR code.
    • encode

      public boolean[][] encode(String src, int width, int height)
      Parameters:
      src - Text to encode into QR code
      width - int
      height - int
      Returns:
      Bits from encoded QR code.
    • encode

      public boolean[][] encode(String src, int version)
      Parameters:
      src - Text to encode into QR code
      version - QR code version
      Returns:
      Bits from encoded QR code.
    • getBitMatrix

      public com.google.zxing.common.BitMatrix getBitMatrix()
      Returns:
      BitMatrix
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • version

      public static String version()
      return the version of the Library.
      Returns:
      String