Package com.aspose.barcode.generation
Enum AutoSizeMode
- java.lang.Object
-
- java.lang.Enum<AutoSizeMode>
-
- com.aspose.barcode.generation.AutoSizeMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AutoSizeMode>
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 Summary
Enum Constants Enum Constant 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
NONE
public static final AutoSizeMode NONE
Automatic resizing is disabled. Default value.
-
NEAREST
public static final AutoSizeMode NEAREST
Barcode resizes to nearest lowest possible size which are specified by BarCodeWidth and BarCodeHeight properties.
-
INTERPOLATION
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
andBarcodeGenerator.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");
-
-
Method Detail
-
values
public static AutoSizeMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AutoSizeMode c : AutoSizeMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AutoSizeMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
-
-