public final class EAN13Writer extends UPCEANWriter
BitMatrix
.构造器和说明 |
---|
EAN13Writer() |
限定符和类型 | 方法和说明 |
---|---|
boolean[] |
encode(java.lang.String contents)
Encode the contents to boolean array expression of one-dimensional barcode.
|
BitMatrix |
encode(java.lang.String contents,
BarcodeFormat format,
int width,
int height,
java.util.Map<EncodeHintType,?> hints)
Encode the contents following specified format.
|
getDefaultMargin
encode
public BitMatrix encode(java.lang.String contents, BarcodeFormat format, int width, int height, java.util.Map<EncodeHintType,?> hints) throws WriterException1
OneDimensionalCodeWriter
width
and height
are required size. This method may return bigger size
BitMatrix
when specified size is too small. The user can set both width
and
height
to zero to get minimum size barcode. If negative value is set to width
or height
, IllegalArgumentException
is thrown.encode
在接口中 Writer
encode
在类中 OneDimensionalCodeWriter
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 imageWriterException1
- if contents cannot be encoded legally in a formatpublic boolean[] encode(java.lang.String contents)
OneDimensionalCodeWriter
encode
在类中 OneDimensionalCodeWriter
contents
- barcode contents to encodeboolean[]
of horizontal pixels (false = white, true = black)