public enum AutoSizeMode extends java.lang.Enum<AutoSizeMode>
Specifies the different types of automatic sizing modes. Default value is AutoSizeMode.NONE.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX); generator.setAutoSizeMode(AutoSizeMode.NEAREST); generator.getBarCodeWidth().setMillimeters(50); generator.getBarCodeHeight().setInches(1.3f); generator.save("test.png");
Enum Constant and Description |
---|
INTERPOLATION
Resizes barcode to specified size with little scaling
but it can be little damaged in some cases
because using interpolation for scaling.
|
NEAREST
Barcode resizes to nearest lowest possible size
which are specified by BarCodeWidth and BarCodeHeight properties.
|
NONE
Automatic resizing is disabled.
|
Modifier and Type | Method and Description |
---|---|
int |
getValue() |
static AutoSizeMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AutoSizeMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AutoSizeMode NONE
Automatic resizing is disabled. Default value.
public static final AutoSizeMode NEAREST
Barcode resizes to nearest lowest possible size which are specified by BarCodeWidth and BarCodeHeight properties.
public static final AutoSizeMode INTERPOLATION
Resizes barcode to specified size with little scaling
but it can be little damaged in some cases
because using interpolation for scaling.
Size can be specified by BarcodeGenerator.BarCodeWidth
and BarcodeGenerator.BarCodeHeight
properties.
This sample shows how to create and save a BarCode image in Scale mode.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX); generator.setAutoSizeMode(AutoSizeMode.INTERPOLATION); generator.getBarCodeWidth().setMillimeters(50); generator.getBarCodeHeight().setInches(1.3f); generator.save("test.png");
public static AutoSizeMode[] values()
for (AutoSizeMode c : AutoSizeMode.values()) System.out.println(c);
public static AutoSizeMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getValue()