public class QRCodeBean extends AbstractBarcodeBean
| Modifier and Type | Field and Description |
|---|---|
protected static double |
DEFAULT_MODULE_WIDTH
The default module width (dot size) for DataMatrix.
|
doQuietZone, fontName, fontSize, height, moduleWidth, msgPos, pattern, quietZone, quietZoneVertical| Constructor and Description |
|---|
QRCodeBean()
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
BarcodeDimension |
calcDimensions(String msg)
Calculates the dimension of a barcode with the given message.
|
void |
generateBarcode(CanvasProvider canvas,
String msg)
Generates a barcode using the given Canvas to render the barcode to its
output format.
|
double |
getBarHeight()
Returns the height of the bars.
|
double |
getBarWidth(int width)
Returns the effective width of a bar with a given logical width.
|
String |
getEncoding()
Returns the message encoding.
|
char |
getErrorCorrectionLevel()
Returns the selected error correction level.
|
Dimension |
getMaxSize()
Returns the maximum symbol size that is to be produced.
|
Dimension |
getMinSize()
Returns the minimum symbol size that is to be produced.
|
double |
getVerticalQuietZone()
Returns the vertical quiet zone.
|
void |
setEncoding(String encoding)
Sets the message encoding.
|
void |
setErrorCorrectionLevel(char level)
Sets the error correction level.
|
void |
setMaxSize(Dimension maxSize)
Sets the maximum symbol size that is to be produced.
|
void |
setMinSize(Dimension minSize)
Sets the minimum symbol size that is to be produced.
|
doQuietZone, getFontName, getFontSize, getHeight, getHumanReadableHeight, getModuleWidth, getMsgPosition, getPattern, getQuietZone, hasFontDescender, hasQuietZone, setBarHeight, setFontName, setFontSize, setHeight, setModuleWidth, setMsgPosition, setPattern, setQuietZone, setVerticalQuietZoneprotected static final double DEFAULT_MODULE_WIDTH
public void setErrorCorrectionLevel(char level)
level - the error correction level (one of L, M, Q and H)public char getErrorCorrectionLevel()
public void setEncoding(String encoding)
encoding - the message encodingpublic String getEncoding()
public void setMinSize(Dimension minSize)
minSize - the minimum size (in pixels), or null for no constraintpublic Dimension getMinSize()
public void setMaxSize(Dimension maxSize)
maxSize - the maximum size (in pixels), or null for no constraintpublic Dimension getMaxSize()
public void generateBarcode(CanvasProvider canvas, String msg)
generateBarcode in interface BarcodeGeneratorgenerateBarcode in class AbstractBarcodeBeancanvas - CanvasProvider that the barcode is to be rendered on.msg - message to encodepublic BarcodeDimension calcDimensions(String msg)
calcDimensions in interface BarcodeGeneratorcalcDimensions in class AbstractBarcodeBeanmsg - message to use for calculation.public double getVerticalQuietZone()
AbstractBarcodeBean.getQuietZone() is returned.getVerticalQuietZone in class AbstractBarcodeBeanpublic double getBarWidth(int width)
getBarWidth in class AbstractBarcodeBeanwidth - the logical width (1=narrow, 2=wide)public double getBarHeight()
getBarHeight in class AbstractBarcodeBeanCopyright © 2003–2023. All rights reserved.