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.
@@ -37,99 +37,117 @@ export declare class baseGraphic extends Feature {
37
37
  */
38
38
  setSmooth(param?: number, isLine?: boolean): void;
39
39
  /**
40
- * 设置图形文字样式
41
- * @param {ITextOption} textStyleOption
42
- * @example
43
- * setTextStyle({
44
- font: "14px Microsoft YaHei",
45
- text: "示例",
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: "#8B4513", //"rgba(255, 255, 255, 1)",
75
+ color: "rgba(255, 0, 0,1)", // 填充色
48
76
  },
49
77
  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,
78
+ color: "rgba(255, 255, 0,1)", // 边框色
79
+ width: 1, //宽度
80
+
59
81
  },
60
- padding: [3, 3, 3, 3],
61
- offsetX: 0,
62
- offsetY: -10,
63
- textBaseline: "bottom",
64
- })
65
- */
66
- setTextStyle(textStyleOption: ITextOption): void;
82
+ })
83
+ */
84
+ setSquarePointStyle(ImageStyleOption: IImageStyle): void;
67
85
  /**
68
- * 设置三角点样式
69
- * @param {IImageStyle} ImageStyleOption
70
- * @example
71
- * setTrianglePointStyle({
72
- scale: 1, //比例
73
- radius: 5, //大小
74
- fill: {
75
- color: "rgba(255, 0, 0,1)", // 填充色
76
- },
77
- stroke: {
78
- color: "rgba(255, 255, 0,1)", // 边框色
79
- width: 1, //宽度
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
- * @param {IImageStyle} ImageStyleOption
88
- * @example
89
- * setCirclePointStyle({
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
- */
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
- * @param {IStrokeOption} strokeStyleOption
106
- * @example
107
- * setStrokeSimpleStyle({
108
- color: "rgba(255, 255, 255,1)", //"#fff",
109
- width: 2, //2,
110
- lineDash:[10,10] 或null
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
- * 设置边框图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
116
- * @param {IStrokeOption} strokeStyleOption
117
- * @example
118
- * setStrokePatternStyle({
119
- pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
120
- // image: undefined,
121
- color: "rgba(255, 255, 0,1)",//背景色
122
- width: 2,
123
- lineDash: null,
124
- ratio: 1,
125
- patternColor: "rgba(0, 0, 0,1)",//图案颜色
126
- offset: 0,
127
- scale: 1,
128
- size: 5,
129
- spacing: 10,
130
- angle: 0
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
- * 设置多边形图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
143
- * @param {IFillOption} fillStyleOption
144
- * @example
145
- * setFillPatternStyle({
146
- pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
147
- // image: undefined,
148
- patternColor: "rgba(0, 0, 0,1)",//图案颜色
149
- fill: "rgba(255, 255, 0,1)",//背景色
150
- width: 2,
151
- lineDash: null,
152
- ratio: 1,
153
- offset: 0,
154
- scale: 1,
155
- size: 5,
156
- spacing: 10,
157
- angle: 0
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有值才能生效