@bettergi/types 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/csharp/BetterGenshinImpact/Core/Recognition/OcrEngineTypes.d.ts +13 -7
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +151 -142
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionTypes.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +12 -7
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +72 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +113 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/ISoloTask.d.ts +13 -0
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts +8 -2
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +65 -52
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +190 -136
- package/csharp/BetterGenshinImpact/GameTask/Model/BaseTaskParam.d.ts +13 -0
- package/csharp/BetterGenshinImpact/View/Drawable/DrawContent.d.ts +45 -0
- package/csharp/BetterGenshinImpact/View/Drawable/LineDrawable.d.ts +17 -9
- package/csharp/BetterGenshinImpact/View/Drawable/RectDrawable.d.ts +20 -10
- package/csharp/Microsoft/Extensions/Localization/IStringLocalizer.d.ts +16 -0
- package/csharp/Microsoft/Extensions/Localization/LocalizedString.d.ts +26 -0
- package/csharp/SixLabors/ImageSharp/Image.d.ts +9 -0
- package/csharp/System/Collections/DictionaryEntry.d.ts +14 -0
- package/csharp/System/Collections/Generic/Dictionary.d.ts +193 -34
- package/csharp/System/Collections/Generic/ICollection.d.ts +15 -9
- package/csharp/System/Collections/Generic/IDictionary.d.ts +11 -22
- package/csharp/System/Collections/Generic/IEnumerable.d.ts +10 -3
- package/csharp/System/Collections/Generic/IEnumerator.d.ts +10 -5
- package/csharp/System/Collections/Generic/IEqualityComparer.d.ts +9 -3
- package/csharp/System/Collections/Generic/IList.d.ts +16 -7
- package/csharp/System/Collections/Generic/IReadOnlyCollection.d.ts +9 -3
- package/csharp/System/Collections/Generic/IReadOnlyDictionary.d.ts +15 -10
- package/csharp/System/Collections/Generic/IReadOnlyList.d.ts +9 -3
- package/csharp/System/Collections/Generic/KeyValuePair.d.ts +15 -8
- package/csharp/System/Collections/Generic/List.d.ts +149 -77
- package/csharp/System/Collections/ICollection.d.ts +17 -0
- package/csharp/System/Collections/IDictionary.d.ts +29 -0
- package/csharp/System/Collections/IDictionaryEnumerator.d.ts +14 -0
- package/csharp/System/Collections/IEnumerable.d.ts +9 -0
- package/csharp/System/Collections/IEnumerator.d.ts +13 -0
- package/csharp/System/Collections/IList.d.ts +30 -0
- package/csharp/System/DateTimeOffset.d.ts +8 -0
- package/csharp/System/Drawing/Bitmap.d.ts +8 -2
- package/csharp/System/Drawing/Color.d.ts +341 -2
- package/csharp/System/Drawing/Image.d.ts +8 -2
- package/csharp/System/Drawing/KnownColor.d.ts +357 -0
- package/csharp/System/Drawing/Pen.d.ts +8 -2
- package/csharp/System/Globalization/CultureInfo.d.ts +9 -0
- package/csharp/System/IAsyncDisposable.d.ts +10 -0
- package/csharp/System/IDisposable.d.ts +9 -0
- package/csharp/System/IEquatable.d.ts +8 -0
- package/csharp/System/Runtime/Serialization/IDeserializationCallback.d.ts +9 -0
- package/csharp/System/Runtime/Serialization/ISerializable.d.ts +9 -0
- package/csharp/System/Threading/CancellationToken.d.ts +58 -0
- package/csharp/System/Threading/CancellationTokenRegistration.d.ts +27 -0
- package/csharp/System/Threading/CancellationTokenSource.d.ts +51 -0
- package/csharp/System/Threading/ITimer.d.ts +12 -0
- package/csharp/System/Threading/Tasks/ValueTask.d.ts +12 -0
- package/csharp/System/Threading/WaitHandle.d.ts +8 -0
- package/csharp/System/TimeProvider.d.ts +31 -0
- package/csharp/System/TimeSpan.d.ts +8 -0
- package/csharp/System/Windows/Media/Matrix.d.ts +80 -0
- package/csharp/System/Windows/Point.d.ts +39 -5
- package/csharp/System/Windows/Vector.d.ts +51 -0
- package/index.d.ts +3 -0
- package/modules/dispatcher.d.ts +54 -3
- package/modules/file.d.ts +3 -3
- package/modules/genshin.d.ts +18 -1
- package/modules/globalMethod.d.ts +9 -5
- package/modules/http.d.ts +43 -0
- package/package.json +1 -1
- package/csharp/Vanara/PInvoke/POINT.d.ts +0 -23
- package/csharp/Vanara/PInvoke/RECT.d.ts +0 -37
- package/csharp/Vanara/PInvoke/SIZE.d.ts +0 -19
- package/enums/wood.d.ts +0 -27
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "../../../System/Collections/Generic/List";
|
|
2
|
+
import "../../../System/Threading/CancellationToken";
|
|
3
|
+
import "../../GameTask/Model/Area/ImageRegion";
|
|
4
|
+
import "../../GameTask/Model/Area/Region";
|
|
5
|
+
import "../ISoloTask";
|
|
6
|
+
import "./AutoFightParam";
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
namespace BetterGenshinImpact.GameTask.AutoFight {
|
|
10
|
+
class AutoFightTask implements BetterGenshinImpact.GameTask.ISoloTask {
|
|
11
|
+
name: string;
|
|
12
|
+
|
|
13
|
+
start(ct: System.Threading.CancellationToken): Promise<void>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 点击使用树脂
|
|
17
|
+
* @param ra 图像识别区域
|
|
18
|
+
* @param resinName 树脂名称
|
|
19
|
+
*/
|
|
20
|
+
static pressUseResin(
|
|
21
|
+
ra: BetterGenshinImpact.GameTask.Model.Area.ImageRegion,
|
|
22
|
+
resinName: string
|
|
23
|
+
): [boolean, number];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 点击使用树脂
|
|
27
|
+
* @param regionList 识别区域列表
|
|
28
|
+
* @param resinName 树脂名称
|
|
29
|
+
*/
|
|
30
|
+
static pressUseResin(
|
|
31
|
+
regionList: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>,
|
|
32
|
+
resinName: string
|
|
33
|
+
): [boolean, number];
|
|
34
|
+
|
|
35
|
+
constructor(taskParam: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
namespace BetterGenshinImpact.GameTask.Model.Area.Converter {
|
|
3
|
+
interface INodeConverter {
|
|
4
|
+
toPrev(x: number, y: number, w: number, h: number): [number, number, number, number];
|
|
5
|
+
}
|
|
6
|
+
}
|
|
3
7
|
}
|
|
8
|
+
|
|
9
|
+
export {};
|
|
@@ -1,54 +1,67 @@
|
|
|
1
1
|
import { Mat, Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
2
|
+
import "../../../../BetterGenshinImpact/Core/Recognition/RecognitionObject";
|
|
3
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter";
|
|
4
|
+
import "../../../../BetterGenshinImpact/GameTask/Model/Area/Region";
|
|
5
|
+
import "../../../../BetterGenshinImpact/View/Drawable/DrawContent";
|
|
6
|
+
import "../../../../SixLabors/ImageSharp/Image";
|
|
7
|
+
import "../../../../System/Collections/Generic/List";
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
+
class ImageRegion extends BetterGenshinImpact.GameTask.Model.Area.Region {
|
|
12
|
+
srcMat: Mat;
|
|
13
|
+
|
|
14
|
+
cacheGreyMat: Mat;
|
|
15
|
+
|
|
16
|
+
cacheImage: SixLabors.ImageSharp.Image;
|
|
17
|
+
|
|
18
|
+
deriveCrop(
|
|
19
|
+
x: number,
|
|
20
|
+
y: number,
|
|
21
|
+
w: number,
|
|
22
|
+
h: number
|
|
23
|
+
): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
24
|
+
|
|
25
|
+
deriveCrop(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 在本区域内查找最优识别对象
|
|
29
|
+
* @param ro 识别对象
|
|
30
|
+
* @param successAction 识别成功回调
|
|
31
|
+
* @param failAction 识别失败回调
|
|
32
|
+
*/
|
|
33
|
+
find: (
|
|
34
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
35
|
+
successAction?: (region: BetterGenshinImpact.GameTask.Model.Area.Region) => void,
|
|
36
|
+
failAction?: () => void
|
|
37
|
+
) => BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 在本区域内查找识别对象,返回所有找到的结果
|
|
41
|
+
* @param ro 识别对象
|
|
42
|
+
* @param successAction 识别成功回调
|
|
43
|
+
* @param failAction 识别失败回调
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
findMulti: (
|
|
47
|
+
ro: BetterGenshinImpact.Core.Recognition.RecognitionObject,
|
|
48
|
+
successAction?: (
|
|
49
|
+
regions: System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>
|
|
50
|
+
) => void,
|
|
51
|
+
failAction?: () => void
|
|
52
|
+
) => System.Collections.Generic.List<BetterGenshinImpact.GameTask.Model.Area.Region>;
|
|
53
|
+
|
|
54
|
+
constructor(
|
|
55
|
+
mat: Mat,
|
|
56
|
+
x: number,
|
|
57
|
+
y: number,
|
|
58
|
+
owner?: BetterGenshinImpact.GameTask.Model.Area.Region,
|
|
59
|
+
converter?: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter,
|
|
60
|
+
drawContent?: BetterGenshinImpact.View.Drawable.DrawContent
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export import ImageRegion = BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
54
65
|
}
|
|
66
|
+
|
|
67
|
+
export {};
|
|
@@ -1,139 +1,193 @@
|
|
|
1
1
|
import { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import "../../../../System/Drawing/Pen";
|
|
3
|
+
import "../../../../System/IDisposable";
|
|
4
|
+
import "../../../GameTask/Model/Area/Converter/INodeConverter";
|
|
5
|
+
import "../../../GameTask/Model/Area/ImageRegion";
|
|
6
|
+
import "../../../View/Drawable/LineDrawable";
|
|
7
|
+
import "../../../View/Drawable/RectDrawable";
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
9
|
+
declare global {
|
|
10
|
+
namespace BetterGenshinImpact.GameTask.Model.Area {
|
|
11
|
+
class Region implements System.IDisposable {
|
|
12
|
+
dispose(): void;
|
|
13
|
+
|
|
14
|
+
/** 水平位置(像素) */
|
|
15
|
+
x: number;
|
|
16
|
+
|
|
17
|
+
/** 垂直位置(像素) */
|
|
18
|
+
y: number;
|
|
19
|
+
|
|
20
|
+
/** 区域宽度 */
|
|
21
|
+
width: number;
|
|
22
|
+
|
|
23
|
+
/** 区域高度 */
|
|
24
|
+
height: number;
|
|
25
|
+
|
|
26
|
+
/** 边界顶部垂直位置(像素) */
|
|
27
|
+
top: number;
|
|
28
|
+
|
|
29
|
+
/** 边界底部垂直位置(像素) */
|
|
30
|
+
bottom: number;
|
|
31
|
+
|
|
32
|
+
/** 边界左侧水平位置(像素) */
|
|
33
|
+
left: number;
|
|
34
|
+
|
|
35
|
+
/** 边界右侧水平位置(像素) */
|
|
36
|
+
right: number;
|
|
37
|
+
|
|
38
|
+
/** 存放OCR识别的结果文本 */
|
|
39
|
+
text: string;
|
|
40
|
+
|
|
41
|
+
/** 上一个区域 */
|
|
42
|
+
prev: BetterGenshinImpact.GameTask.Model.Area.Region | null;
|
|
43
|
+
|
|
44
|
+
/** 本区域节点向上一个区域节点坐标的转换器 */
|
|
45
|
+
prevConverter: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter | null;
|
|
46
|
+
|
|
47
|
+
/** 点击 [当前区域] 中心(后台模拟) */
|
|
48
|
+
backgroundClick(): void;
|
|
49
|
+
|
|
50
|
+
/** 点击 [当前区域] 中心 */
|
|
51
|
+
click(): void;
|
|
52
|
+
|
|
53
|
+
/** 点击 [当前区域] 指定位置 */
|
|
54
|
+
clickTo(x: number, y: number): void;
|
|
55
|
+
|
|
56
|
+
/** 点击 [当前区域] 指定位置 */
|
|
57
|
+
clickTo(x: number, y: number, w: number, h: number): void;
|
|
58
|
+
|
|
59
|
+
/** 移动鼠标到 [当前区域] 中心 */
|
|
60
|
+
move(): void;
|
|
61
|
+
|
|
62
|
+
/** 移动鼠标到指定位置 */
|
|
63
|
+
moveTo(x: number, y: number): void;
|
|
64
|
+
|
|
65
|
+
/** 移动鼠标到指定位置 */
|
|
66
|
+
moveTo(x: number, y: number, w: number, h: number): void;
|
|
67
|
+
|
|
68
|
+
/** 绘制当前区域 */
|
|
69
|
+
drawSelf(name: string, pen?: System.Drawing.Pen): void;
|
|
70
|
+
|
|
71
|
+
/** 绘制矩形区域 */
|
|
72
|
+
drawRect(
|
|
73
|
+
x: number,
|
|
74
|
+
y: number,
|
|
75
|
+
w: number,
|
|
76
|
+
h: number,
|
|
77
|
+
name: string,
|
|
78
|
+
pen?: System.Drawing.Pen
|
|
79
|
+
): void;
|
|
80
|
+
|
|
81
|
+
/** 绘制矩形区域 */
|
|
82
|
+
drawRect(rect: Rect, name: string, pen?: System.Drawing.Pen): void;
|
|
83
|
+
|
|
84
|
+
/** 将 [当前区域] 转换成 [遮罩窗口绘制矩形] */
|
|
85
|
+
selfToRectDrawable(
|
|
86
|
+
name: string,
|
|
87
|
+
pen?: System.Drawing.Pen
|
|
88
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
89
|
+
|
|
90
|
+
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
91
|
+
toRectDrawable(
|
|
92
|
+
rect: Rect,
|
|
93
|
+
name: string,
|
|
94
|
+
pen?: System.Drawing.Pen
|
|
95
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
96
|
+
|
|
97
|
+
/** 将 [区域] 转换成 [遮罩窗口绘制矩形] */
|
|
98
|
+
toRectDrawable(
|
|
99
|
+
x: number,
|
|
100
|
+
y: number,
|
|
101
|
+
w: number,
|
|
102
|
+
h: number,
|
|
103
|
+
name: string,
|
|
104
|
+
pen?: System.Drawing.Pen
|
|
105
|
+
): BetterGenshinImpact.View.Drawable.RectDrawable;
|
|
106
|
+
|
|
107
|
+
/** 将 [直线] 转换成 [遮罩窗口绘制直线] */
|
|
108
|
+
toLineDrawable(
|
|
109
|
+
x1: number,
|
|
110
|
+
y1: number,
|
|
111
|
+
x2: number,
|
|
112
|
+
y2: number,
|
|
113
|
+
name: string,
|
|
114
|
+
pen?: System.Drawing.Pen
|
|
115
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
116
|
+
|
|
117
|
+
/** 绘制直线 */
|
|
118
|
+
drawLine(
|
|
119
|
+
x1: number,
|
|
120
|
+
y1: number,
|
|
121
|
+
x2: number,
|
|
122
|
+
y2: number,
|
|
123
|
+
name: string,
|
|
124
|
+
pen?: System.Drawing.Pen
|
|
125
|
+
): BetterGenshinImpact.View.Drawable.LineDrawable;
|
|
126
|
+
|
|
127
|
+
/** 将当前区域的截图转换成矩形类型的区域 */
|
|
128
|
+
convertSelfPositionToGameCaptureRegion(): Rect;
|
|
129
|
+
|
|
130
|
+
/** 将指定区域的截图转换成矩形类型的区域 */
|
|
131
|
+
convertPositionToGameCaptureRegion(x: number, y: number, w: number, h: number): Rect;
|
|
132
|
+
|
|
133
|
+
/** 将指定区域的截图转换成位置元组 */
|
|
134
|
+
convertPositionToGameCaptureRegion(x: number, y: number): [number, number];
|
|
135
|
+
|
|
136
|
+
/** 将指定桌面区域的截图转换成位置元组 */
|
|
137
|
+
convertPositionToDesktopRegion(x: number, y: number): [number, number];
|
|
138
|
+
|
|
139
|
+
/** 生成一个新的矩形类型的区域 */
|
|
140
|
+
toRect(): Rect;
|
|
141
|
+
|
|
142
|
+
/** 生成一个新的图片类型的区域 */
|
|
143
|
+
toImageRegion(): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
144
|
+
|
|
145
|
+
/** 区域面积是否为空 */
|
|
146
|
+
isEmpty(): boolean;
|
|
147
|
+
|
|
148
|
+
/** 区域面积是否为空 */
|
|
149
|
+
isExist(): boolean;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 派生一个点类型的区域
|
|
153
|
+
* @param x 水平位置(像素)
|
|
154
|
+
* @param y 垂直位置(像素)
|
|
155
|
+
*/
|
|
156
|
+
derive(x: number, y: number): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 派生一个点类型的区域
|
|
160
|
+
* @param x 水平位置(像素)
|
|
161
|
+
* @param y 垂直位置(像素)
|
|
162
|
+
* @param w 宽度
|
|
163
|
+
* @param h 高度
|
|
164
|
+
*/
|
|
165
|
+
derive(
|
|
166
|
+
x: number,
|
|
167
|
+
y: number,
|
|
168
|
+
w: number,
|
|
169
|
+
h: number
|
|
170
|
+
): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 派生一个矩形类型的区域
|
|
174
|
+
* @param rect 矩形
|
|
175
|
+
*/
|
|
176
|
+
derive(rect: Rect): BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
177
|
+
|
|
178
|
+
constructor();
|
|
179
|
+
|
|
180
|
+
constructor(
|
|
181
|
+
x: number,
|
|
182
|
+
y: number,
|
|
183
|
+
width: number,
|
|
184
|
+
height: number,
|
|
185
|
+
owner?: BetterGenshinImpact.GameTask.Model.Area.Region,
|
|
186
|
+
converter?: BetterGenshinImpact.GameTask.Model.Area.Converter.INodeConverter
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
export import Region = BetterGenshinImpact.GameTask.Model.Area.Region;
|
|
139
191
|
}
|
|
192
|
+
|
|
193
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../../../Microsoft/Extensions/Localization/IStringLocalizer";
|
|
2
|
+
import "../../../System/Globalization/CultureInfo";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.GameTask.Model {
|
|
6
|
+
abstract class BaseTaskParam<T> {
|
|
7
|
+
gameCultureInfo: System.Globalization.CultureInfo;
|
|
8
|
+
|
|
9
|
+
stringLocalizer: Microsoft.Extensions.Localization.IStringLocalizer<T>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "../../../System/Collections/Generic/Dictionary";
|
|
2
|
+
import "../../../System/Collections/Generic/List";
|
|
3
|
+
import "./LineDrawable";
|
|
4
|
+
import "./RectDrawable";
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace BetterGenshinImpact.View.Drawable {
|
|
8
|
+
class DrawContent {
|
|
9
|
+
/** 在遮罩窗口上绘制的矩形 */
|
|
10
|
+
rectList: System.Collections.Generic.Dictionary<
|
|
11
|
+
string,
|
|
12
|
+
System.Collections.Generic.List<BetterGenshinImpact.View.Drawable.RectDrawable>
|
|
13
|
+
>;
|
|
14
|
+
|
|
15
|
+
/** 在遮罩窗口上绘制的文本 */
|
|
16
|
+
textList: System.Collections.Generic.Dictionary<
|
|
17
|
+
string,
|
|
18
|
+
System.Collections.Generic.List<BetterGenshinImpact.View.Drawable.RectDrawable>
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
/** 在遮罩窗口上绘制的文本 */
|
|
22
|
+
lineList: System.Collections.Generic.Dictionary<
|
|
23
|
+
string,
|
|
24
|
+
System.Collections.Generic.List<BetterGenshinImpact.View.Drawable.RectDrawable>
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
putRect(key: string, newRect: BetterGenshinImpact.View.Drawable.RectDrawable): void;
|
|
28
|
+
|
|
29
|
+
putOrRemoveRectList(
|
|
30
|
+
key: string,
|
|
31
|
+
list: System.Collections.Generic.List<BetterGenshinImpact.View.Drawable.RectDrawable> | null
|
|
32
|
+
): void;
|
|
33
|
+
|
|
34
|
+
removeRects(key: string): void;
|
|
35
|
+
|
|
36
|
+
putLine(key: string, newLine: BetterGenshinImpact.View.Drawable.LineDrawable): void;
|
|
37
|
+
|
|
38
|
+
removeLines(key: string): void;
|
|
39
|
+
|
|
40
|
+
clearAll(): void;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../../../System/Drawing/Pen";
|
|
2
|
+
import "../../../System/Windows/Point";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.View.Drawable {
|
|
6
|
+
class LineDrawable {
|
|
7
|
+
/** 绘制直线起始位置 */
|
|
8
|
+
p1: System.Windows.Point;
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
/** 绘制直线终点位置 */
|
|
11
|
+
p2: System.Windows.Point;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
/** 绘制颜色及宽度 */
|
|
14
|
+
pen: System.Drawing.Pen;
|
|
15
|
+
|
|
16
|
+
constructor(p1: System.Windows.Point, p2: System.Windows.Point, pen: System.Drawing.Pen);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
13
19
|
}
|
|
20
|
+
|
|
21
|
+
export {};
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { Rect } from "mirada/dist/src/types/opencv";
|
|
2
|
-
import
|
|
2
|
+
import "../../../System/Drawing/Pen";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare global {
|
|
5
|
+
namespace BetterGenshinImpact.View.Drawable {
|
|
6
|
+
class RectDrawable {
|
|
7
|
+
/** 绘制区域名称 */
|
|
8
|
+
name: string | null;
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
/** 绘制区域 */
|
|
11
|
+
rect: Rect;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
/** 绘制颜色及宽度 */
|
|
14
|
+
pen: System.Drawing.Pen;
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/** 区域面积是否为空 */
|
|
17
|
+
isEmpty: boolean;
|
|
18
|
+
|
|
19
|
+
constructor(rect: Rect, pen?: System.Drawing.Pen, name?: string);
|
|
20
|
+
|
|
21
|
+
constructor(rect: Rect, name?: string);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
}
|
|
25
|
+
|
|
26
|
+
export {};
|