ms-types 0.9.25 → 0.9.26

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.
@@ -22,15 +22,15 @@ declare namespace $图片 {
22
22
  区域右下角X坐标?: 数字,
23
23
  区域右下角Y坐标?: 数字,
24
24
  ): 字符串 | null;
25
- /**
26
- * 截图
27
- * @returns 截图的imageId ,如果截图失败则返回null
28
- * @deprecated 请改用 截取屏幕()。
29
- * @example
30
- * const 图片ID = $图片.截取屏幕()
31
- * if (图片ID) {
32
- * $图片.保存图片(图片ID, "screen.jpg")
33
- * }
25
+ /**
26
+ * 截图
27
+ * @returns 截图的imageId ,如果截图失败则返回null
28
+ * @deprecated 请改用 截取屏幕()。
29
+ * @example
30
+ * const 图片ID = $图片.截取屏幕()
31
+ * if (图片ID) {
32
+ * $图片.保存图片(图片ID, "screen.jpg")
33
+ * }
34
34
  */
35
35
  function 截取全屏(): 字符串 | null;
36
36
  /**
@@ -38,14 +38,14 @@ declare namespace $图片 {
38
38
  * @param 区域左上角X坐标
39
39
  * @param 区域左上角Y坐标
40
40
  * @param 区域右下角X坐标
41
- * @param 区域右下角Y坐标
42
- * @returns 截图的imageId ,如果截图失败则返回null
43
- * @deprecated 请改用 截取屏幕(区域左上角X坐标, 区域左上角Y坐标, 区域右下角X坐标, 区域右下角Y坐标)。
44
- * @example
45
- * const 图片ID = $图片.截取屏幕(0, 0, 100, 100)
46
- * if (图片ID) {
47
- * $图片.保存图片(图片ID, "screen.jpg")
48
- * }
41
+ * @param 区域右下角Y坐标
42
+ * @returns 截图的imageId ,如果截图失败则返回null
43
+ * @deprecated 请改用 截取屏幕(区域左上角X坐标, 区域左上角Y坐标, 区域右下角X坐标, 区域右下角Y坐标)。
44
+ * @example
45
+ * const 图片ID = $图片.截取屏幕(0, 0, 100, 100)
46
+ * if (图片ID) {
47
+ * $图片.保存图片(图片ID, "screen.jpg")
48
+ * }
49
49
  */
50
50
  function 截取区域(
51
51
  区域左上角X坐标: 数字,
@@ -64,11 +64,11 @@ declare namespace $图片 {
64
64
  /**
65
65
  * 图片是否已释放
66
66
  * @param imageId 图片id
67
- * @returns true 已释放 false 未释放
68
- * @example
69
- * const 图片ID = $图片.截取屏幕()
70
- * if (图片ID) {
71
- * $图片.保存图片(图片ID, "screen.jpg")
67
+ * @returns true 已释放 false 未释放
68
+ * @example
69
+ * const 图片ID = $图片.截取屏幕()
70
+ * if (图片ID) {
71
+ * $图片.保存图片(图片ID, "screen.jpg")
72
72
  * $图片.图片是否被释放(图片ID) // false
73
73
  * $图片.释放图片(图片ID)
74
74
  * $图片.图片是否被释放(图片ID) // true
@@ -247,8 +247,10 @@ declare namespace $图片 {
247
247
  * @param 方法 方法
248
248
  * @param 是否使用RGB找图 是否使用RGB找图,默认false
249
249
  * @param 选项 选项
250
- * @param 选项.scaleFactors 缩放匹配法缩放因子数组,默认[1.0, 0.9, 1.1, 0.8, 1.2]
251
- * @returns 图片数组
250
+ * @param 选项.scaleFactors 仅方法=99 生效。模板缩放比例列表(不是屏幕 scale)。
251
+ * 应围绕 baseScale=当前设备宽/截模板设备宽 生成,例如 baseScale 附近 ±0.05~0.1 共 3~7 档;
252
+ * 默认 [1.0, 0.9, 1.1, 0.8, 1.2] 只适合尺寸接近时的盲扫,跨大分辨率请按设备动态计算。
253
+ * @returns 图片数组;方法=99 时结果额外含 scaleX/scaleY
252
254
  * @example
253
255
  * const 图片数组 = $图片.找图("screen", "template.jpg", 0, 0, 100, 100, 0.9, 1, 5, false)
254
256
  * if (图片数组.length > 0) {
@@ -280,6 +282,10 @@ declare namespace $图片 {
280
282
  centerY: 数字;
281
283
  ex: 数字;
282
284
  ey: 数字;
285
+ /** 仅方法=99 返回:命中时模板的横向缩放比例 */
286
+ scaleX?: 数字;
287
+ /** 仅方法=99 返回:命中时模板的纵向缩放比例 */
288
+ scaleY?: 数字;
283
289
  }[];
284
290
  /**
285
291
  * 裁剪图片