public class BarcodeSettings
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
float |
getBaseXDimension()
Gets a base x-dimension, that is, the smallest width of the unit of barcode bars and spaces.
|
float |
getBaseYDimension()
Gets a base y-dimension, that is, the smallest height of the unit of 2D barcode modules.
|
int |
getGraphicsUnit()
Gets a graphics unit used to measure
getBaseXDimension() / setBaseXDimension(float) and getBaseYDimension() / setBaseYDimension(float) . |
boolean |
getUseAutoCorrection()
Gets a value indicating whether an invalid barcode value should be corrected automatically (if possible) to fit the barcode's specification or an exception should be thrown to indicate the error.
|
float |
getXResolution()
Gets the horizontal resolution of a barcode image being generated.
|
float |
getYResolution()
Gets the vertical resolution of a barcode image being generated.
|
void |
setBaseXDimension(float value)
Sets a base x-dimension, that is, the smallest width of the unit of barcode bars and spaces.
|
void |
setBaseYDimension(float value)
Sets a base y-dimension, that is, the smallest height of the unit of 2D barcode modules.
|
void |
setGraphicsUnit(int value)
Sets a graphics unit used to measure
getBaseXDimension() / setBaseXDimension(float) and getBaseYDimension() / setBaseYDimension(float) . |
void |
setUseAutoCorrection(boolean value)
Sets a value indicating whether an invalid barcode value should be corrected automatically (if possible) to fit the barcode's specification or an exception should be thrown to indicate the error.
|
public int getGraphicsUnit()
getBaseXDimension()
/ setBaseXDimension(float)
and getBaseYDimension()
/ setBaseYDimension(float)
. The default value is GraphicsUnit.MILLIMETER
.getBaseXDimension()
/ setBaseXDimension(float)
and getBaseYDimension()
/ setBaseYDimension(float)
. The returned value is one of GraphicsUnit
constants.public void setGraphicsUnit(int value)
getBaseXDimension()
/ setBaseXDimension(float)
and getBaseYDimension()
/ setBaseYDimension(float)
. The default value is GraphicsUnit.MILLIMETER
.value
- A graphics unit used to measure getBaseXDimension()
/ setBaseXDimension(float)
and getBaseYDimension()
/ setBaseYDimension(float)
. The value must be one of GraphicsUnit
constants.public float getBaseXDimension()
getGraphicsUnit()
/ setGraphicsUnit(int)
.
When barcode scaling is applied through a template, an actual x-dimension is calculated upon the base x-dimension and a scaling factor.public void setBaseXDimension(float value)
getGraphicsUnit()
/ setGraphicsUnit(int)
.
When barcode scaling is applied through a template, an actual x-dimension is calculated upon the base x-dimension and a scaling factor.value
- A base x-dimension, that is, the smallest width of the unit of barcode bars and spaces.public float getBaseYDimension()
getGraphicsUnit()
/ setGraphicsUnit(int)
.
Barcodes of some types (such as data matrix) may ignore an y-dimension and use an x-dimension for both width and height units.
When barcode scaling is applied through a template, an actual y-dimension is calculated upon the base y-dimension and a scaling factor.
public void setBaseYDimension(float value)
getGraphicsUnit()
/ setGraphicsUnit(int)
.
Barcodes of some types (such as data matrix) may ignore an y-dimension and use an x-dimension for both width and height units.
When barcode scaling is applied through a template, an actual y-dimension is calculated upon the base y-dimension and a scaling factor.
value
- A base y-dimension, that is, the smallest height of the unit of 2D barcode modules.public float getXResolution()
public float getYResolution()
public boolean getUseAutoCorrection()
public void setUseAutoCorrection(boolean value)
value
- A value indicating whether an invalid barcode value should be corrected automatically (if possible) to fit the barcode's specification or an exception should be thrown to indicate the error.