|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.zxing.oned.OneDimensionalCodeWriter
public abstract class OneDimensionalCodeWriter
Encapsulates functionality and implementation that is common to one-dimensional barcodes.
| Constructor Summary | |
|---|---|
OneDimensionalCodeWriter()
|
|
| Method Summary | |
|---|---|
protected static int |
appendPattern(boolean[] target,
int pos,
int[] pattern,
boolean startColor)
Appends the given pattern to the target array starting at pos. |
abstract boolean[] |
encode(String contents)
Encode the contents to byte array expression of one-dimensional barcode. |
BitMatrix |
encode(String contents,
BarcodeFormat format,
int width,
int height)
Encode a barcode using the default settings. |
BitMatrix |
encode(String contents,
BarcodeFormat format,
int width,
int height,
Map<EncodeHintType,?> hints)
Encode the contents following specified format. |
int |
getDefaultMargin()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OneDimensionalCodeWriter()
| Method Detail |
|---|
public BitMatrix encode(String contents,
BarcodeFormat format,
int width,
int height)
throws WriterException
Writer
encode in interface Writercontents - The contents to encode in the barcodeformat - The barcode format to generatewidth - The preferred width in pixelsheight - The preferred height in pixels
WriterException
public BitMatrix encode(String contents,
BarcodeFormat format,
int width,
int height,
Map<EncodeHintType,?> hints)
throws WriterException
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 in interface Writercontents - 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 encoder
WriterException
protected static int appendPattern(boolean[] target,
int pos,
int[] pattern,
boolean startColor)
startColor - starting color - false for white, true for black
public int getDefaultMargin()
public abstract boolean[] encode(String contents)
boolean[] of horizontal pixels (false = white, true = black)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||