ShapeBundle 捆绑多个 shape 的 buildPath 方法,但是共用同一个样式
Example
var poly1 = new PolygonShape();
var poly2 = new PolygonShape();
var poly3 = new PolygonShape();
var shapeBundle = new ShapeBundle({
style: {
shapeList: [poly1, poly2, poly3],
color: 'red'
}
});
zr.addShape(shapeBundle);
Members
-
highlightStylemodule:zrender/shape/ShapeBundle~IShapeBundleStyle
-
ShapeBundle高亮绘制样式
-
ShapeBundle绘制样式
Type Definitions
-
IShapeBundleStyleObject
-
Properties:
Name Type Argument Default Description shapeListstring shape列表
brushTypestring <optional>
'fill' colorstring <optional>
'#000000' 填充颜色
strokeColorstring <optional>
'#000000' 描边颜色
lineCapestring <optional>
'butt' 线帽样式,可以是 butt, round, square
lineWidthnumber <optional>
1 描边宽度
opacitynumber <optional>
1 绘制透明度
shadowBlurnumber <optional>
0 阴影模糊度,大于0有效
shadowColorstring <optional>
'#000000' 阴影颜色
shadowOffsetXnumber <optional>
0 阴影横向偏移
shadowOffsetYnumber <optional>
0 阴影纵向偏移
textstring <optional>
图形中的附加文本
textColorstring <optional>
'#000000' 文本颜色
textFontstring <optional>
附加文本样式,eg:'bold 18px verdana'
textPositionstring <optional>
'end' 附加文本位置, 可以是 inside, left, right, top, bottom
textAlignstring <optional>
默认根据textPosition自动设置,附加文本水平对齐。 可以是start, end, left, right, center
textBaselinestring <optional>
默认根据textPosition自动设置,附加文本垂直对齐。 可以是top, bottom, middle, alphabetic, hanging, ideographic