ms-types 0.4.12 → 0.4.13
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/package.json +1 -1
- package/types/image.d.ts +16 -1
package/package.json
CHANGED
package/types/image.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
declare namespace image {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 截图屏幕
|
|
7
7
|
* @param x 截图区域左上角x坐标
|
|
8
8
|
* @param y 截图区域左上角y坐标
|
|
9
9
|
* @param ex 截图区域右下角x坐标
|
|
@@ -15,6 +15,21 @@ declare namespace image {
|
|
|
15
15
|
* image.saveTo(imageId, "screen.jpg")
|
|
16
16
|
* }
|
|
17
17
|
*/
|
|
18
|
+
function captureScreen(
|
|
19
|
+
x?: number,
|
|
20
|
+
y?: number,
|
|
21
|
+
ex?: number,
|
|
22
|
+
ey?: number,
|
|
23
|
+
): string | null;
|
|
24
|
+
/**
|
|
25
|
+
* 截图
|
|
26
|
+
* @returns 截图的imageId ,如果截图失败则返回null
|
|
27
|
+
* @example
|
|
28
|
+
* const imageId = image.captureFullScreen()
|
|
29
|
+
* if (imageId) {
|
|
30
|
+
* image.saveTo(imageId, "screen.jpg")
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
18
33
|
function captureFullScreen(): string | null;
|
|
19
34
|
/**
|
|
20
35
|
* 截图指定区域
|