当前位置: 首页>>代码示例>>Java>>正文


Java BarcodeFormat.CODE_93属性代码示例

本文整理汇总了Java中com.google.zxing.BarcodeFormat.CODE_93属性的典型用法代码示例。如果您正苦于以下问题:Java BarcodeFormat.CODE_93属性的具体用法?Java BarcodeFormat.CODE_93怎么用?Java BarcodeFormat.CODE_93使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.google.zxing.BarcodeFormat的用法示例。


在下文中一共展示了BarcodeFormat.CODE_93属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: encode

@Override
public BitMatrix encode(String contents,
                        BarcodeFormat format,
                        int width,
                        int height,
                        Map<EncodeHintType,?> hints) throws WriterException {
  if (format != BarcodeFormat.CODE_93) {
    throw new IllegalArgumentException("Can only encode CODE_93, but got " + format);
  }
  return super.encode(contents, format, width, height, hints);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:11,代码来源:Code93Writer.java

示例2: parseBarCodeString

/**
 * Parse barcodes as BarcodeFormat constants.
 *
 * Supports all iOS codes except [code39mod43, itf14]
 *
 * Additionally supports [codabar, maxicode, rss14, rssexpanded, upca, upceanextension]
 */
private BarcodeFormat parseBarCodeString(String c) {
    if ("aztec".equals(c)) {
        return BarcodeFormat.AZTEC;
    } else if ("ean13".equals(c)) {
        return BarcodeFormat.EAN_13;
    } else if ("ean8".equals(c)) {
        return BarcodeFormat.EAN_8;
    } else if ("qr".equals(c)) {
        return BarcodeFormat.QR_CODE;
    } else if ("pdf417".equals(c)) {
        return BarcodeFormat.PDF_417;
    } else if ("upce".equals(c)) {
        return BarcodeFormat.UPC_E;
    } else if ("datamatrix".equals(c)) {
        return BarcodeFormat.DATA_MATRIX;
    } else if ("code39".equals(c)) {
        return BarcodeFormat.CODE_39;
    } else if ("code93".equals(c)) {
        return BarcodeFormat.CODE_93;
    } else if ("interleaved2of5".equals(c)) {
        return BarcodeFormat.ITF;
    } else if ("codabar".equals(c)) {
        return BarcodeFormat.CODABAR;
    } else if ("code128".equals(c)) {
        return BarcodeFormat.CODE_128;
    } else if ("maxicode".equals(c)) {
        return BarcodeFormat.MAXICODE;
    } else if ("rss14".equals(c)) {
        return BarcodeFormat.RSS_14;
    } else if ("rssexpanded".equals(c)) {
        return BarcodeFormat.RSS_EXPANDED;
    } else if ("upca".equals(c)) {
        return BarcodeFormat.UPC_A;
    } else if ("upceanextension".equals(c)) {
        return BarcodeFormat.UPC_EAN_EXTENSION;
    } else {
        android.util.Log.v("RCTCamera", "Unsupported code.. [" + c + "]");
        return null;
    }
}
 
开发者ID:jonathan68,项目名称:react-native-camera,代码行数:47,代码来源:RCTCameraViewFinder.java

示例3: decodeRow

public Result decodeRow(int rowNumber, BitArray row, Map<DecodeHintType, ?> map) throws
        NotFoundException, ChecksumException, FormatException {
    int[] start = findAsteriskPattern(row);
    int nextStart = row.getNextSet(start[1]);
    int end = row.getSize();
    int[] theCounters = this.counters;
    Arrays.fill(theCounters, 0);
    StringBuilder result = this.decodeRowResult;
    result.setLength(0);
    char decodedChar;
    do {
        OneDReader.recordPattern(row, nextStart, theCounters);
        int pattern = toPattern(theCounters);
        if (pattern < 0) {
            throw NotFoundException.getNotFoundInstance();
        }
        decodedChar = patternToChar(pattern);
        result.append(decodedChar);
        int lastStart = nextStart;
        for (int counter : theCounters) {
            nextStart += counter;
        }
        nextStart = row.getNextSet(nextStart);
    } while (decodedChar != '*');
    result.deleteCharAt(result.length() - 1);
    int lastPatternSize = 0;
    for (int counter2 : theCounters) {
        lastPatternSize += counter2;
    }
    if (nextStart == end || !row.get(nextStart)) {
        throw NotFoundException.getNotFoundInstance();
    } else if (result.length() < 2) {
        throw NotFoundException.getNotFoundInstance();
    } else {
        checkChecksums(result);
        result.setLength(result.length() - 2);
        float left = ((float) (start[1] + start[0])) / 2.0f;
        float right = ((float) lastStart) + (((float) lastPatternSize) / 2.0f);
        return new Result(decodeExtended(result), null, new ResultPoint[]{new ResultPoint
                (left, (float) rowNumber), new ResultPoint(right, (float) rowNumber)},
                BarcodeFormat.CODE_93);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:43,代码来源:Code93Reader.java


注:本文中的com.google.zxing.BarcodeFormat.CODE_93属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。