GPAL - Generally Positive Automation Library
v1.0
GPAL The Fluent Automation LIbrary
Toggle main menu visibility
Loading...
Searching...
No Matches
OCRInterfaces.cs
1
// =============================================================================
2
// GPAL - Generally Positive Automation Library
3
// Copyright © 2026 Software Decisions, Inc. All rights reserved.
4
//
5
// This file is part of GPAL.
6
// Licensed under the Business Source License 1.1
7
//
8
// Primary development, architecture, and vision by Michael B. Vederman,
9
// CEO of Software Decisions, Inc., Texas.
10
//
11
// Internal development maintained privately.
12
// Public releases appear on GitHub: https://github.com/SoftwareDecisionsInc/GPAL.
13
//
14
// See LICENSE for full terms, including Additional Use Grant.
15
// =============================================================================
16
17
using
System;
18
using
System.Collections.Generic;
19
using
System.Linq;
20
using
System.Text;
21
using
System.Threading.Tasks;
22
using
static
GenerallyPositive
.
Enums
;
23
24
namespace
GenerallyPositive
25
{
26
public
class
OCRInterfaces
27
{
28
#region <Application Interfaces>
29
#region <Base Application Interfaces>
30
public
interface
IAllowOCRRegion
31
{
32
[Settings(Description =
"The part of the image to read"
)]
33
IAllowOCRSettings
WithRegion(
ClientRectangle
region);
34
}
35
36
public
interface
IAllowOCRSettings
:
IAllowOCRRegion
, IAllowToGPALObject<IGPALOCR>
37
{
38
[Settings(Description =
"The direction the text runs in"
)]
39
IAllowOCRSettingsOrExecute
WithScanDirection(OCRScanDirection direction);
40
[Settings(Description =
"The language of the text"
)]
41
IAllowOCRSettingsOrExecute
WithLanguage(OCRLanguage lang);
42
[Settings(Description =
"Which OCR engine reads the image"
)]
43
IAllowOCRSettingsOrExecute
WithEngineMode(EngineMode mode);
44
[Settings(Description =
"Only these characters can be read"
)]
45
IAllowOCRSettingsOrExecute
WithCharacterWhitelist(
string
chars);
46
[Settings(Description =
"Only read a standard set of characters, such as digits"
)]
47
IAllowOCRSettingsOrExecute
WithStandardWhitelist(OCRWhitelist preset);
48
[Settings(Description =
"The resolution the image is read at"
)]
49
IAllowOCRSettingsOrExecute
WithDPI(
int
dpi);
50
[Settings(Description =
"How many times to try again when nothing is read"
)]
51
IAllowOCRSettingsOrExecute
WithRetryCount(
int
count);
52
[Settings(Description =
"How long reading may take"
)]
53
IAllowOCRSettingsOrExecute
WithTimeout(TimeSpan timeout);
54
}
55
56
public
interface
IAllowOCRSettingsOrExecute
:
IAllowOCRSettings
57
{
58
[Action(Description =
"Save the text that was read into a grid"
)]
59
IAllowOCRSettings
SaveTo(IGPALGrid<string> grid);
60
}
61
public
interface
IGPALOCR
:
IAllowOCRSettingsOrExecute
{ }
62
63
#endregion <Base Application Interfaces>
64
#endregion <Application Interfaces>
65
66
public
interface
IAllowToGPALObject<TResult>
67
{
68
TResult ToGPALObject();
69
}
70
71
}
72
}
73
GenerallyPositive.ClientRectangle
Represents a client-side bounding rectangle (similar to DOMRect) with additional convenience properti...
Definition
GPALElement.cs:64
GenerallyPositive.Enums
Definition
Enums.cs:36
GenerallyPositive.OCRInterfaces
Definition
OCRInterfaces.cs:27
GenerallyPositive.OCRInterfaces.IAllowOCRRegion
Definition
OCRInterfaces.cs:31
GenerallyPositive.OCRInterfaces.IAllowOCRSettings
Definition
OCRInterfaces.cs:37
GenerallyPositive.OCRInterfaces.IAllowOCRSettingsOrExecute
Definition
OCRInterfaces.cs:57
GenerallyPositive.OCRInterfaces.IGPALOCR
Definition
OCRInterfaces.cs:61
GenerallyPositive
Definition
Application.cs:35
Common
OCRInterfaces.cs
Generated by
1.17.0