MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / constructor

Method constructor

src/common/overlay/levelRenderer/Shape.js:20–223  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

18 */
19export class Shape extends mixin(Eventful, Transformable) {
20 constructor(options) {
21 super(options);
22
23 options = options || {};
24 /**
25 * @member {string} LevelRenderer.Shape.prototype.id
26 * @description 唯一标识。
27 */
28 this.id = null;
29
30 /**
31 * @member {Object} LevelRenderer.Shape.prototype.style
32 * @description 基础绘制样式。
33 * @param {string} style.brushType - 画笔类型。可设值:"fill", "stroke", "both"。默认值:"fill"
34 * @param {string} style.color - 填充颜色。默认值:"#000000'"
35 * @param {string} style.strokeColor - 描边颜色。默认值:"#000000'"
36 * @param {string} style.lineCape - 线帽样式。可设值:"butt", "round", "square"。默认值:"butt"
37 * @param {number} style.lineWidth - 描边宽度。默认值:1。
38 * @param {number} style.opacity - 绘制透明度。默认值:1。
39 * @param {number} style.shadowBlur - 阴影模糊度,大于0有效。默认值:0。
40 * @param {number} style.shadowColor - 阴影颜色。默认值:"#000000'"
41 * @param {number} style.shadowOffsetX - 阴影横向偏移。默认值:0。
42 * @param {number} style.shadowOffsetY - 阴影纵向偏移。默认值:0。
43 * @param {string} style.text - 图形中的附加文本。默认值:""
44 * @param {string} style.textColor - 文本颜色。默认值:"#000000'"
45 * @param {string} style.textFont - 附加文本样式。示例:'bold 18px verdana'
46 * @param {string} style.textPosition - 附加文本位置。可设值:"inside", "left", "right", top", "bottom", "end"。默认值:"end"。
47 * @param {string} style.textAlign - 附加文本水平对齐方式。可设值:"start", "end", "left", "right", "center"。默认根据 textPosition 自动设置。
48 * @param {string} style.textBaseline - 附加文本垂直对齐方式。可设值:"top", "bottom", "middle", "alphabetic", "hanging", "ideographic"。默认根据 textPosition 自动设置。
49 *
50 */
51 this.style = {};
52
53 /**
54 * @member {Object} LevelRenderer.Shape.prototype.style.__rect
55 * @description 包围图形的最小矩形盒子。
56 *
57 * @param {number} x - 左上角顶点x轴坐标。
58 * @param {number} y - 左上角顶点y轴坐标。
59 * @param {number} width - 包围盒矩形宽度。
60 * @param {number} height - 包围盒矩形高度。
61 */
62
63 /**
64 * @member {Object} LevelRenderer.Shape.prototype.highlightStyle
65 * @description 高亮样式。
66 *
67 * @param {string} highlightStyle.brushType - 画笔类型。可设值:"fill", "stroke", "both"。默认值:"fill"
68 * @param {string} highlightStyle.color - 填充颜色。默认值:"#000000'"
69 * @param {string} highlightStyle.strokeColor - 描边颜色。默认值:"#000000'"
70 * @param {string} highlightStyle.lineCape - 线帽样式。可设值:"butt", "round", "square"。默认值:"butt"
71 * @param {number} highlightStyle.lineWidth - 描边宽度。默认值:1。
72 * @param {number} highlightStyle.opacity - 绘制透明度。默认值:1。
73 * @param {number} highlightStyle.shadowBlur - 阴影模糊度,大于0有效。默认值:0。
74 * @param {number} highlightStyle.shadowColor - 阴影颜色。默认值:"#000000'"
75 * @param {number} highlightStyle.shadowOffsetX - 阴影横向偏移。默认值:0。
76 * @param {number} highlightStyle.shadowOffsetY - 阴影纵向偏移。默认值:0。
77 * @param {string} highlightStyle.text - 图形中的附加文本。默认值:""

Callers

nothing calls this directly

Calls 4

extendMethod · 0.80
invertMethod · 0.80
mulVectorMethod · 0.80
updateNeedTransformMethod · 0.80

Tested by

no test coverage detected