Krom, Robertus d8f5259fe0 Fixed OS output, as it didn't display Windows 10.
Fixed version string.
Improved OCR and QR code a bit.
2020-02-25 14:30:03 +01:00

52 lines
1.3 KiB
C#

using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GreenshotPlugin.Interfaces.Ocr
{
/// <summary>
/// Contains all the information on the OCR result
/// </summary>
public class OcrInformation
{
/// <summary>
/// Check if there is any content
/// </summary>
public bool HasContent => Lines.Any();
/// <summary>
/// The complete text
/// </summary>
public string Text
{
get
{
// Build the text from the lines, otherwise it's just everything concatenated together
var text = new StringBuilder();
foreach (var line in Lines)
{
text.AppendLine(line.Text);
}
return text.ToString();
}
}
/// <summary>
/// The lines of test which the OCR engine found
/// </summary>
public IList<Line> Lines { get; } = new List<Line>();
/// <summary>
/// Change the offset of the
/// </summary>
/// <param name="x">int</param>
/// <param name="y">int</param>
public void Offset(int x, int y)
{
foreach (var line in Lines)
{
line.Offset(x,y);
}
}
}
}