Constructor and Description |
---|
DataMatrixWriter() |
Modifier and Type | Method and Description |
---|---|
private static BitMatrix |
convertByteMatrixToBitMatrix(ByteMatrix matrix,
int reqWidth,
int reqHeight)
Convert the ByteMatrix to BitMatrix.
|
BitMatrix |
encode(java.lang.String contents,
BarcodeFormat format,
int width,
int height)
Encode a barcode using the default settings.
|
BitMatrix |
encode(java.lang.String contents,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints) |
private static BitMatrix |
encodeLowLevel(DefaultPlacement placement,
SymbolInfo symbolInfo,
int width,
int height)
Encode the given symbol info to a bit matrix.
|
public BitMatrix encode(java.lang.String contents, BarcodeFormat format, int width, int height)
Writer
public BitMatrix encode(java.lang.String contents, BarcodeFormat format, int width, int height, java.util.Map<EncodeHintType,?> hints)
encode
in interface Writer
contents
- The contents to encode in the barcodeformat
- The barcode format to generatewidth
- The preferred width in pixelsheight
- The preferred height in pixelshints
- Additional parameters to supply to the encoderBitMatrix
representing encoded barcode imageprivate static BitMatrix encodeLowLevel(DefaultPlacement placement, SymbolInfo symbolInfo, int width, int height)
placement
- The DataMatrix placement.symbolInfo
- The symbol info to encode.private static BitMatrix convertByteMatrixToBitMatrix(ByteMatrix matrix, int reqWidth, int reqHeight)
reqHeight
- The requested height of the image (in pixels) with the Datamatrix codereqWidth
- The requested width of the image (in pixels) with the Datamatrix codematrix
- The input matrix.