Fixed compile error from previous commit

This commit is contained in:
Krom, Robertus 2020-02-25 08:26:27 +01:00
commit bb11899d71

View file

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Linq;
using GreenshotPlugin.Interfaces; using GreenshotPlugin.Interfaces;
using GreenshotPlugin.Interfaces.Ocr; using GreenshotPlugin.Interfaces.Ocr;
using log4net; using log4net;
@ -178,9 +179,17 @@ namespace GreenshotPlugin.Core
// Offset the OCR information // Offset the OCR information
CaptureDetails.OcrInformation?.Offset(-cropRectangle.Location.X, -cropRectangle.Location.Y); CaptureDetails.OcrInformation?.Offset(-cropRectangle.Location.X, -cropRectangle.Location.Y);
var offsetted // Offset the Qr information
CaptureDetails.QrResult.ResultPoints[0]; var oldQrResult = CaptureDetails.QrResult;
var resultPoint = new ResultPoint(); if (oldQrResult != null)
{
CaptureDetails.OcrInformation?.Offset(-cropRectangle.Location.X, -cropRectangle.Location.Y);
var offsetPoints = CaptureDetails.QrResult.ResultPoints
.Select(p => new ResultPoint(p.X - cropRectangle.Location.X, p.Y - cropRectangle.Location.Y)).ToArray();
var newQqResult = new Result(oldQrResult.Text, oldQrResult.RawBytes, offsetPoints, oldQrResult.BarcodeFormat);
CaptureDetails.QrResult = newQqResult;
}
// Remove invisible elements // Remove invisible elements
var visibleElements = new List<ICaptureElement>(); var visibleElements = new List<ICaptureElement>();