"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/oned/Code93Writer.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

Code93Writer.java  (zxing-zxing-3.4.1):Code93Writer.java  (zxing-zxing-3.5.0)
skipping to change at line 42 skipping to change at line 42
/** /**
* @param contents barcode contents to encode. It should not be encoded for ex tended characters. * @param contents barcode contents to encode. It should not be encoded for ex tended characters.
* @return a {@code boolean[]} of horizontal pixels (false = white, true = bla ck) * @return a {@code boolean[]} of horizontal pixels (false = white, true = bla ck)
*/ */
@Override @Override
public boolean[] encode(String contents) { public boolean[] encode(String contents) {
contents = convertToExtended(contents); contents = convertToExtended(contents);
int length = contents.length(); int length = contents.length();
if (length > 80) { if (length > 80) {
throw new IllegalArgumentException( throw new IllegalArgumentException("Requested contents should be less than
"Requested contents should be less than 80 digits long after converting 80 digits long after " +
to extended encoding, but got " + length); "converting to extended encoding, but got " + length);
} }
//length of code + 2 start/stop characters + 2 checksums, each of 9 bits, pl us a termination bar //length of code + 2 start/stop characters + 2 checksums, each of 9 bits, pl us a termination bar
int codeWidth = (contents.length() + 2 + 2) * 9 + 1; int codeWidth = (contents.length() + 2 + 2) * 9 + 1;
boolean[] result = new boolean[codeWidth]; boolean[] result = new boolean[codeWidth];
//start character (*) //start character (*)
int pos = appendPattern(result, 0, Code93Reader.ASTERISK_ENCODING); int pos = appendPattern(result, 0, Code93Reader.ASTERISK_ENCODING);
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)