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; }
public ByteMatrix encode(System.String contents, BarcodeFormat format, int width, int height, System.Collections.Hashtable 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); } }
public ByteMatrix encode(System.String contents, BarcodeFormat format, int width, int height) { return encode(contents, format, width, height, null); }