mirage2d 1.2.8 → 1.2.9
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/dist/graphic/baseGraphic.d.ts +118 -100
- package/dist/mirage2d.cjs.js +37 -37
- package/dist/mirage2d.umd.js +37 -37
- package/package.json +1 -1
|
@@ -37,99 +37,117 @@ export declare class baseGraphic extends Feature {
|
|
|
37
37
|
*/
|
|
38
38
|
setSmooth(param?: number, isLine?: boolean): void;
|
|
39
39
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
* 设置图形文字样式
|
|
41
|
+
* @param {ITextOption} textStyleOption
|
|
42
|
+
* @example
|
|
43
|
+
* setTextStyle({
|
|
44
|
+
font: "14px Microsoft YaHei",
|
|
45
|
+
text: "示例",
|
|
46
|
+
fill: {
|
|
47
|
+
color: "#8B4513", //"rgba(255, 255, 255, 1)",
|
|
48
|
+
},
|
|
49
|
+
stroke: {
|
|
50
|
+
color: "rgba(255, 255, 255,1)", //"#fff",
|
|
51
|
+
width: 2, //2,
|
|
52
|
+
},
|
|
53
|
+
backgroundFill: {
|
|
54
|
+
color: "rgba(255, 255, 255, 0.0)", //"rgba(255, 255, 255, 1)",
|
|
55
|
+
},
|
|
56
|
+
backgroundStroke: {
|
|
57
|
+
color: "rgba(0, 0, 0, 0.0)", //"#fff",
|
|
58
|
+
width: 2,
|
|
59
|
+
},
|
|
60
|
+
padding: [3, 3, 3, 3],
|
|
61
|
+
offsetX: 0,
|
|
62
|
+
offsetY: -10,
|
|
63
|
+
textBaseline: "bottom",
|
|
64
|
+
})
|
|
65
|
+
*/
|
|
66
|
+
setTextStyle(textStyleOption: ITextOption): void;
|
|
67
|
+
/**
|
|
68
|
+
* 设置正方形样式
|
|
69
|
+
* @param {IImageStyle} ImageStyleOption
|
|
70
|
+
* @example
|
|
71
|
+
* setSquarePointStyle({
|
|
72
|
+
scale: 1, // 比例
|
|
73
|
+
radius: 5, // 大小
|
|
46
74
|
fill: {
|
|
47
|
-
color: "
|
|
75
|
+
color: "rgba(255, 0, 0,1)", // 填充色
|
|
48
76
|
},
|
|
49
77
|
stroke: {
|
|
50
|
-
color: "rgba(255, 255,
|
|
51
|
-
width:
|
|
52
|
-
|
|
53
|
-
backgroundFill: {
|
|
54
|
-
color: "rgba(255, 255, 255, 0.0)", //"rgba(255, 255, 255, 1)",
|
|
55
|
-
},
|
|
56
|
-
backgroundStroke: {
|
|
57
|
-
color: "rgba(0, 0, 0, 0.0)", //"#fff",
|
|
58
|
-
width: 2,
|
|
78
|
+
color: "rgba(255, 255, 0,1)", // 边框色
|
|
79
|
+
width: 1, //宽度
|
|
80
|
+
|
|
59
81
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
textBaseline: "bottom",
|
|
64
|
-
})
|
|
65
|
-
*/
|
|
66
|
-
setTextStyle(textStyleOption: ITextOption): void;
|
|
82
|
+
})
|
|
83
|
+
*/
|
|
84
|
+
setSquarePointStyle(ImageStyleOption: IImageStyle): void;
|
|
67
85
|
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
* 设置三角点样式
|
|
87
|
+
* @param {IImageStyle} ImageStyleOption
|
|
88
|
+
* @example
|
|
89
|
+
* setTrianglePointStyle({
|
|
90
|
+
scale: 1, //比例
|
|
91
|
+
radius: 5, //大小
|
|
92
|
+
fill: {
|
|
93
|
+
color: "rgba(255, 0, 0,1)", // 填充色
|
|
94
|
+
},
|
|
95
|
+
stroke: {
|
|
96
|
+
color: "rgba(255, 255, 0,1)", // 边框色
|
|
97
|
+
width: 1, //宽度
|
|
98
|
+
|
|
99
|
+
},
|
|
100
|
+
})
|
|
101
|
+
*/
|
|
84
102
|
setTrianglePointStyle(ImageStyleOption: IImageStyle): void;
|
|
85
103
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
* 设置圆点样式
|
|
105
|
+
* @param {IImageStyle} ImageStyleOption
|
|
106
|
+
* @example
|
|
107
|
+
* setCirclePointStyle({
|
|
108
|
+
scale: 1, //比例
|
|
109
|
+
radius: 5, //大小
|
|
110
|
+
fill: {
|
|
111
|
+
color: "rgba(255, 0, 0,1)", // 填充色
|
|
112
|
+
},
|
|
113
|
+
stroke: {
|
|
114
|
+
color: "rgba(255, 255, 0,1)", // 边框色
|
|
115
|
+
width: 1, //宽度
|
|
116
|
+
|
|
117
|
+
},
|
|
118
|
+
})
|
|
119
|
+
*/
|
|
102
120
|
setCirclePointStyle(ImageStyleOption: IImageStyle): void;
|
|
103
121
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
122
|
+
* 设置边框简单模式样式
|
|
123
|
+
* @param {IStrokeOption} strokeStyleOption
|
|
124
|
+
* @example
|
|
125
|
+
* setStrokeSimpleStyle({
|
|
126
|
+
color: "rgba(255, 255, 255,1)", //"#fff",
|
|
127
|
+
width: 2, //2,
|
|
128
|
+
lineDash:[10,10] 或null
|
|
129
|
+
})
|
|
130
|
+
*/
|
|
113
131
|
setStrokeSimpleStyle(strokeStyleOption: IStrokeOption): void;
|
|
114
132
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
* 设置边框图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
|
|
134
|
+
* @param {IStrokeOption} strokeStyleOption
|
|
135
|
+
* @example
|
|
136
|
+
* setStrokePatternStyle({
|
|
137
|
+
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
|
|
138
|
+
// image: undefined,
|
|
139
|
+
color: "rgba(255, 255, 0,1)",//背景色
|
|
140
|
+
width: 2,
|
|
141
|
+
lineDash: null,
|
|
142
|
+
ratio: 1,
|
|
143
|
+
patternColor: "rgba(0, 0, 0,1)",//图案颜色
|
|
144
|
+
offset: 0,
|
|
145
|
+
scale: 1,
|
|
146
|
+
size: 5,
|
|
147
|
+
spacing: 10,
|
|
148
|
+
angle: 0
|
|
149
|
+
})
|
|
150
|
+
*/
|
|
133
151
|
setStrokePatternStyle(strokeStyleOption: IStrokeOption): void;
|
|
134
152
|
/**
|
|
135
153
|
* 设置填充简单模式样式 ,从图片模式转到普通模式时,需注意等图片加载完成后才可设置
|
|
@@ -139,24 +157,24 @@ export declare class baseGraphic extends Feature {
|
|
|
139
157
|
*/
|
|
140
158
|
setFillColor(color: string): void;
|
|
141
159
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
* 设置多边形图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
|
|
161
|
+
* @param {IFillOption} fillStyleOption
|
|
162
|
+
* @example
|
|
163
|
+
* setFillPatternStyle({
|
|
164
|
+
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
|
|
165
|
+
// image: undefined,
|
|
166
|
+
patternColor: "rgba(0, 0, 0,1)",//图案颜色
|
|
167
|
+
fill: "rgba(255, 255, 0,1)",//背景色
|
|
168
|
+
width: 2,
|
|
169
|
+
lineDash: null,
|
|
170
|
+
ratio: 1,
|
|
171
|
+
offset: 0,
|
|
172
|
+
scale: 1,
|
|
173
|
+
size: 5,
|
|
174
|
+
spacing: 10,
|
|
175
|
+
angle: 0
|
|
176
|
+
})
|
|
177
|
+
*/
|
|
160
178
|
setFillPatternStyle(fillStyleOption: IFillOption): void;
|
|
161
179
|
/**
|
|
162
180
|
* 设置多边形图片填充模式样式,初始设置时当pattern==null或undefined 且image有值才能生效
|