Пример #1
0
 public Result(System.String text, sbyte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format)
 {
     if (text == null && rawBytes == null)
     {
         throw new System.ArgumentException("Text and bytes are null");
     }
     this.text = text;
     this.rawBytes = rawBytes;
     this.resultPoints = resultPoints;
     this.format = format;
     this.resultMetadata = null;
 }
Пример #2
0
 public ByteMatrix encode(System.String contents, BarcodeFormat format, int width, int height, System.Collections.Generic.Dictionary<Object, Object> hints)
 {
     if (format == BarcodeFormat.EAN_8)
     {
         return new EAN8Writer().encode(contents, format, width, height, hints);
     }
     else if (format == BarcodeFormat.EAN_13)
     {
         return new EAN13Writer().encode(contents, format, width, height, hints);
     }
     else if (format == BarcodeFormat.QR_CODE)
     {
         return new QRCodeWriter().encode(contents, format, width, height, hints);
     }
     else
     {
         throw new System.ArgumentException("No encoder available for format " + format);
     }
 }
Пример #3
0
 public ByteMatrix encode(System.String contents, BarcodeFormat format, int width, int height)
 {
     return encode(contents, format, width, height, null);
 }