public class BaseGenerationParameters
extends java.lang.Object
Barcode image generation parameters.
Modifier and Type | Method and Description |
---|---|
AutoSizeMode |
getAutoSizeMode()
Specifies the different types of automatic sizing modes.
|
java.awt.Color |
getBackColor()
Background color of the barcode image.
|
BarcodeParameters |
getBarcode()
Gets the
BarcodeParameters that contains all barcode properties. |
BorderParameters |
getBorder()
Gets the
BorderParameters that contains all configuration properties for barcode border. |
CaptionParameters |
getCaptionAbove()
Caption Above the BarCode image.
|
CaptionParameters |
getCaptionBelow()
Caption Below the BarCode image.
|
Unit |
getImageHeight()
BarCode image height when
AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. |
Unit |
getImageWidth()
BarCode image width when
AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. |
float |
getResolution()
Gets the resolution of the BarCode image.
|
float |
getRotationAngle()
BarCode image rotation angle, measured in degree, e.g.
|
void |
setAutoSizeMode(AutoSizeMode value)
Specifies the different types of automatic sizing modes.
|
void |
setBackColor(java.awt.Color value)
Background color of the barcode image.
|
void |
setImageHeight(Unit value)
BarCode image height when
AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. |
void |
setImageWidth(Unit value)
BarCode image width when
AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. |
void |
setResolution(float value)
Sets the resolution of the BarCode image.
|
void |
setRotationAngle(float value)
BarCode image rotation angle, measured in degree, e.g.
|
public java.awt.Color getBackColor()
Background color of the barcode image.
Default value: Color.White.
See Color
.
public void setBackColor(java.awt.Color value)
Background color of the barcode image.
Default value: Color.White.
See Color
.
public float getResolution()
Gets the resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi.
java.lang.IllegalArgumentException
- <p>The <b>Resolution</b> parameter value is less than or equal to 0.</p>
public void setResolution(float value)
Sets the resolution of the BarCode image. One value for both dimensions. Default value: 96 dpi.
java.lang.IllegalArgumentException
- <p>The <b>Resolution</b> parameter value is less than or equal to 0.</p>
public float getRotationAngle()
BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX); generator.getParameters().setRotationAngle(7f); generator.save("test.png");
public void setRotationAngle(float value)
BarCode image rotation angle, measured in degree, e.g. RotationAngle = 0 or RotationAngle = 360 means no rotation. If RotationAngle NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image. Default value: 0.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX); generator.getParameters().setRotationAngle(7f); generator.save("test.png");
public CaptionParameters getCaptionAbove()
Caption Above the BarCode image. See CaptionParameters
.
public CaptionParameters getCaptionBelow()
Caption Below the BarCode image. See CaptionParameters
.
public AutoSizeMode getAutoSizeMode()
Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.NONE.
public void setAutoSizeMode(AutoSizeMode value)
Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.NONE.
public Unit getImageHeight()
BarCode image height when AutoSizeMode
property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
public void setImageHeight(Unit value)
BarCode image height when AutoSizeMode
property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
public Unit getImageWidth()
BarCode image width when AutoSizeMode
property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
public void setImageWidth(Unit value)
BarCode image width when AutoSizeMode
property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
public BarcodeParameters getBarcode()
Gets the BarcodeParameters
that contains all barcode properties.
public BorderParameters getBorder()
Gets the BorderParameters
that contains all configuration properties for barcode border.