Пример #1
0
 public Result(string text, sbyte[] rawBytes, ResultPoint[] resultPoints, BarcodeFormat format, long timestamp)
 {
     this.text = text;
     this.rawBytes = rawBytes;
     this.resultPoints = resultPoints;
     this.format = format;
     this.resultMetadata = null;
     this.timestamp = timestamp;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FinderPattern"/> class.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <param name="startEnd">The start end.</param>
 /// <param name="start">The start.</param>
 /// <param name="end">The end.</param>
 /// <param name="rowNumber">The row number.</param>
 public FinderPattern(int value, int[] startEnd, int start, int end, int rowNumber)
 {
    Value = value;
    StartEnd = startEnd;
    ResultPoints = new ResultPoint[]
                           {
                              new ResultPoint(start, rowNumber),
                              new ResultPoint(end, rowNumber),
                           };
 }
Пример #3
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;
 }
Пример #4
0
 public DetectorResult(BitMatrix bits, ResultPoint[] points)
 {
    Bits = bits;
    Points = points;
 }
Пример #5
0
 public DetectorResult(BitMatrix bits, ResultPoint[] points)
 {
     this.bits = bits;
     this.points = points;
 }
Пример #6
0
 public void addResultPoints(ResultPoint[] newPoints)
 {
     ResultPoint[] oldPoints = resultPoints;
     if (oldPoints == null)
     {
         resultPoints = newPoints;
     }
     else if (newPoints != null && newPoints.Length > 0)
     {
         ResultPoint[] allPoints = new ResultPoint[oldPoints.Length + newPoints.Length];
         Array.Copy(oldPoints, 0, allPoints, 0, oldPoints.Length);
         Array.Copy(newPoints, 0, allPoints, oldPoints.Length, newPoints.Length);
         resultPoints = allPoints;
     }
 }
 /// <summary>
 /// Constructs a QrCodeData object.
 /// </summary>
 /// <param name="resultPoints">Result points detected by ZXing</param>
 /// <param name="id">Id of QR-code</param>
 public QrCodeData(ResultPoint[] resultPoints, int id)
 {
     _target = resultPoints;
     Id = id;
     _time = DateTime.UtcNow;
 }
 /// <summary>
 /// Update the position of the object through new <see cref="ResultPoint"/>s. Also resets the timers used to detroy the object.
 /// </summary>
 /// <param name="newResultPoints">Newly detected QR-code position</param>
 public void Update(ResultPoint[] newResultPoints)
 {
     _target = newResultPoints;
     _time = DateTime.UtcNow;
     _destroyTime = DateTime.MinValue;
 }