com.google.zxing.aztec.encoder.Encoder# encode ( ) 源码实例Demo

下面列出了com.google.zxing.aztec.encoder.Encoder# encode ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ZXing-Orient   文件: AztecWriter.java

private static BitMatrix encode(String contents, BarcodeFormat format,
                                int width, int height,
                                Charset charset, int eccPercent, int layers) {
  if (format != BarcodeFormat.AZTEC) {
    throw new IllegalArgumentException("Can only encode AZTEC, but got " + format);
  }
  AztecCode aztec = Encoder.encode(contents.getBytes(charset), eccPercent, layers);
  return renderResult(aztec, width, height);
}
 

private static BitMatrix encode(String contents, BarcodeFormat format,
                                int width, int height,
                                Charset charset, int eccPercent, int layers) {
  if (format != BarcodeFormat.AZTEC) {
    throw new IllegalArgumentException("Can only encode AZTEC, but got " + format);
  }
  AztecCode aztec = Encoder.encode(contents.getBytes(charset), eccPercent, layers);
  return renderResult(aztec, width, height);
}
 
源代码3 项目: weex   文件: AztecWriter.java

private static BitMatrix encode(String contents, BarcodeFormat format,
                                int width, int height,
                                Charset charset, int eccPercent, int layers) {
  if (format != BarcodeFormat.AZTEC) {
    throw new IllegalArgumentException("Can only encode AZTEC, but got " + format);
  }
  AztecCode aztec = Encoder.encode(contents.getBytes(charset), eccPercent, layers);
  return renderResult(aztec, width, height);
}
 

private static BitMatrix encode(String contents, BarcodeFormat format,
                                int width, int height,
                                Charset charset, int eccPercent, int layers) {
  if (format != BarcodeFormat.AZTEC) {
    throw new IllegalArgumentException("Can only encode AZTEC, but got " + format);
  }
  AztecCode aztec = Encoder.encode(contents.getBytes(charset), eccPercent, layers);
  return renderResult(aztec, width, height);
}
 
 同类方法