ms-types 0.4.20 → 0.4.22
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
CHANGED
package/types/draw.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 绘图模块 包含绘制操作等功能
|
|
3
3
|
*/
|
|
4
4
|
declare namespace draw {
|
|
5
5
|
/**
|
|
@@ -20,7 +20,7 @@ declare namespace draw {
|
|
|
20
20
|
ex: number,
|
|
21
21
|
ey: number,
|
|
22
22
|
lineWidth?: number,
|
|
23
|
-
color?: string
|
|
23
|
+
color?: string,
|
|
24
24
|
): string;
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -39,7 +39,7 @@ declare namespace draw {
|
|
|
39
39
|
y: number,
|
|
40
40
|
radius: number,
|
|
41
41
|
lineWidth?: number,
|
|
42
|
-
color?: string
|
|
42
|
+
color?: string,
|
|
43
43
|
): string;
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -64,7 +64,7 @@ declare namespace draw {
|
|
|
64
64
|
ey: number,
|
|
65
65
|
fontSize?: number,
|
|
66
66
|
color?: string,
|
|
67
|
-
bgColor?: string
|
|
67
|
+
bgColor?: string,
|
|
68
68
|
): string;
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -76,7 +76,7 @@ declare namespace draw {
|
|
|
76
76
|
function clear(id?: string): void;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* 关闭绘制层并清除绘图模块
|
|
80
80
|
* @example
|
|
81
81
|
* draw.close();
|
|
82
82
|
*/
|
package/types/zh/index.d.ts
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/// <reference path="全局模块.d.ts" />
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 绘图模块 包含绘制操作等功能
|
|
5
|
+
*/
|
|
6
|
+
declare namespace $绘图模块 {
|
|
7
|
+
/**
|
|
8
|
+
* 绘制矩形
|
|
9
|
+
* @param 矩形左上角x坐标
|
|
10
|
+
* @param 矩形左上角y坐标
|
|
11
|
+
* @param 矩形右下角x坐标
|
|
12
|
+
* @param 矩形右下角y坐标
|
|
13
|
+
* @param 线宽 默认1
|
|
14
|
+
* @param 颜色 默认#000000 支持#RRGGBB、#AARRGGBB、rgb(r,g,b)、rgba(r,g,b,a)格式
|
|
15
|
+
* @returns 绘制的矩形ID
|
|
16
|
+
* @example
|
|
17
|
+
* $绘图模块.绘制矩形(0, 0, 100, 100);
|
|
18
|
+
*/
|
|
19
|
+
function 绘制矩形(
|
|
20
|
+
矩形左上角x坐标: 数字,
|
|
21
|
+
矩形左上角y坐标: 数字,
|
|
22
|
+
矩形右下角x坐标: 数字,
|
|
23
|
+
矩形右下角y坐标: 数字,
|
|
24
|
+
线宽?: 数字,
|
|
25
|
+
颜色?: 字符串,
|
|
26
|
+
): 字符串;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 绘制圆
|
|
30
|
+
* @param 圆中心x坐标
|
|
31
|
+
* @param 圆中心y坐标
|
|
32
|
+
* @param 圆半径
|
|
33
|
+
* @param 线宽 默认1
|
|
34
|
+
* @param 颜色 默认#000000 支持#RRGGBB、#AARRGGBB、rgb(r,g,b)、rgba(r,g,b,a)格式
|
|
35
|
+
* @returns 绘制的圆ID
|
|
36
|
+
* @example
|
|
37
|
+
* $绘图模块.绘制圆形(50, 50, 25);
|
|
38
|
+
*/
|
|
39
|
+
function 绘制圆形(
|
|
40
|
+
圆中心x坐标: 数字,
|
|
41
|
+
圆中心y坐标: 数字,
|
|
42
|
+
圆半径: 数字,
|
|
43
|
+
线宽?: 数字,
|
|
44
|
+
颜色?: 字符串,
|
|
45
|
+
): 字符串;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 绘制文本
|
|
49
|
+
* @param 文本内容
|
|
50
|
+
* @param 文本左上角x坐标
|
|
51
|
+
* @param 文本左上角y坐标
|
|
52
|
+
* @param 文本右下角x坐标
|
|
53
|
+
* @param 文本右下角y坐标
|
|
54
|
+
* @param 字体大小 默认12
|
|
55
|
+
* @param 颜色 默认#000000 支持#RRGGBB、#AARRGGBB、rgb(r,g,b)、rgba(r,g,b,a)格式
|
|
56
|
+
* @param 背景颜色 默认透明 支持#RRGGBB、#AARRGGBB、rgb(r,g,b)、rgba(r,g,b,a)格式
|
|
57
|
+
* @returns 绘制的文本ID
|
|
58
|
+
* @example
|
|
59
|
+
* $绘图模块.绘制文字("Hello, World!", 0, 0, 100, 100);
|
|
60
|
+
*/
|
|
61
|
+
function 绘制文字(
|
|
62
|
+
文本内容: 字符串,
|
|
63
|
+
文本左上角x坐标: 数字,
|
|
64
|
+
文本左上角y坐标: 数字,
|
|
65
|
+
文本右下角x坐标: 数字,
|
|
66
|
+
文本右下角y坐标: 数字,
|
|
67
|
+
字体大小?: 数字,
|
|
68
|
+
颜色?: 字符串,
|
|
69
|
+
背景颜色?: 字符串,
|
|
70
|
+
): 字符串;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 清除绘制的内容
|
|
74
|
+
* @param 绘制的内容ID 绘制的内容ID , 不传清除所有绘制内容,传ID清除指定绘制内容
|
|
75
|
+
* @example
|
|
76
|
+
* $绘图模块.清除("rect1");
|
|
77
|
+
*/
|
|
78
|
+
function 清除(绘制的内容ID?: 字符串): void;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 关闭绘制层并清除绘图模块
|
|
82
|
+
* @example
|
|
83
|
+
* $绘图模块.关闭绘制();
|
|
84
|
+
*/
|
|
85
|
+
function 关闭绘制(): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 显示绘制层
|
|
89
|
+
* @example
|
|
90
|
+
* $绘图模块.显示绘制();
|
|
91
|
+
*/
|
|
92
|
+
function 显示绘制(): void;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 隐藏绘制层
|
|
96
|
+
* @example
|
|
97
|
+
* $绘图模块.隐藏绘制();
|
|
98
|
+
*/
|
|
99
|
+
function 隐藏绘制(): void;
|
|
100
|
+
}
|