mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
Fixed compile error from previous commit
This commit is contained in:
parent
684a7615d7
commit
bb11899d71
1 changed files with 12 additions and 3 deletions
|
@ -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>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue