Class QrCode
java.lang.Object
eu.webtoolkit.jwt.thirdparty.qrcodegen.QrCode
A QR Code symbol, which is a type of two-dimension barcode. Invented by Denso Wave and described
in the ISO/IEC 18004 standard. Instances of this class represent an immutable square grid of dark
and light cells. The class provides static factory functions to create a QR Code from text or
binary data. The class covers the QR Code Model 2 specification, supporting all versions (sizes)
from 1 to 40, all 4 error correction levels, and 4 character encoding modes.
Ways to create a QR Code object:
- High level: Take the payload data and call QrCode::encodeText() or QrCode::encodeBinary().
- Mid level: Custom-make the list of segments and call QrCode::encodeSegments().
- Low level: Custom-make the array of data codeword bytes (including segment headers and final padding, excluding error correction codewords), supply the appropriate version number, and call the QrCode() constructor. (Note that all ways require supplying the desired error correction level.)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QrCodeencodeBinary(List<Integer> data, Ecc ecl) static final QrCodeencodeSegments(List<QrSegment> segs, Ecc ecl) static final QrCodeencodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion) static final QrCodeencodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion, int maxVersion) static final QrCodeencodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion, int maxVersion, int mask) static QrCodeencodeSegments(List<QrSegment> segs, Ecc ecl, int minVersion, int maxVersion, int mask, boolean boostEcl) static QrCodeencodeText(String text, Ecc ecl) intgetMask()booleangetModule(int x, int y) intgetSize()int
-
Field Details
-
MIN_VERSION
public static final int MIN_VERSION- See Also:
-
MAX_VERSION
public static final int MAX_VERSION- See Also:
-
-
Constructor Details
-
QrCode
-
-
Method Details
-
encodeText
-
encodeBinary
-
encodeSegments
-
encodeSegments
-
encodeSegments
-
encodeSegments
-
encodeSegments
-
getVersion
public int getVersion() -
getSize
public int getSize() -
getErrorCorrectionLevel
-
getMask
public int getMask() -
getModule
public boolean getModule(int x, int y)
-