Package net.atthegate.server.service.pdf
Class QRCode
java.lang.Object
net.atthegate.server.service.pdf.QRCode
- All Implemented Interfaces:
Drawable
Used to create 2D QR Code barcodes. Please see Example_20.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]
Draws this barcode on the specified page.protected int
Boolean[][]
getData()
protected int
protected boolean
isDark
(int row, int col) protected void
make
(boolean test, int maskPattern) void
setLocation
(float x, float y) Sets the location where this barcode will be drawn on the page.void
setModuleLength
(double moduleLength) Sets the module length of this barcode.void
setModuleLength
(float moduleLength) Sets the module length of this barcode.void
setPosition
(double x, double y) Sets the position where this barcode will be drawn on the page.void
setPosition
(float x, float y) Sets the position where this barcode will be drawn on the page.
-
Constructor Details
-
QRCode
Used to create 2D QR Code barcodes.- Parameters:
str
- the string to encode.errorCorrectLevel
- the desired error correction level.- Throws:
UnsupportedEncodingException
-
-
Method Details
-
setPosition
public void setPosition(double x, double y) Sets the position where this barcode will be drawn on the page.- Parameters:
x
- the x coordinate of the top left corner of the barcode.y
- the y coordinate of the top left corner of the barcode.
-
setPosition
public void setPosition(float x, float y) Sets the position where this barcode will be drawn on the page.- Parameters:
x
- the x coordinate of the top left corner of the barcode.y
- the y coordinate of the top left corner of the barcode.
-
setLocation
public void setLocation(float x, float y) Sets the location where this barcode will be drawn on the page.- Parameters:
x
- the x coordinate of the top left corner of the barcode.y
- the y coordinate of the top left corner of the barcode.
-
setModuleLength
public void setModuleLength(double moduleLength) Sets the module length of this barcode. The default value is 2.0f- Parameters:
moduleLength
- the specified module length.
-
setModuleLength
public void setModuleLength(float moduleLength) Sets the module length of this barcode. The default value is 2.0f- Parameters:
moduleLength
- the specified module length.
-
drawOn
Draws this barcode on the specified page. -
getData
-
isDark
protected boolean isDark(int row, int col) - Parameters:
row
- the row.col
- the column.
-
getModuleCount
protected int getModuleCount() -
getBestMaskPattern
protected int getBestMaskPattern() -
make
protected void make(boolean test, int maskPattern)
-