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 shapeList
string shape列表
brushType
string <optional>
'fill' color
string <optional>
'#000000' 填充颜色
strokeColor
string <optional>
'#000000' 描边颜色
lineCape
string <optional>
'butt' 线帽样式,可以是 butt, round, square
lineWidth
number <optional>
1 描边宽度
opacity
number <optional>
1 绘制透明度
shadowBlur
number <optional>
0 阴影模糊度,大于0有效
shadowColor
string <optional>
'#000000' 阴影颜色
shadowOffsetX
number <optional>
0 阴影横向偏移
shadowOffsetY
number <optional>
0 阴影纵向偏移
text
string <optional>
图形中的附加文本
textColor
string <optional>
'#000000' 文本颜色
textFont
string <optional>
附加文本样式,eg:'bold 18px verdana'
textPosition
string <optional>
'end' 附加文本位置, 可以是 inside, left, right, top, bottom
textAlign
string <optional>
默认根据textPosition自动设置,附加文本水平对齐。 可以是start, end, left, right, center
textBaseline
string <optional>
默认根据textPosition自动设置,附加文本垂直对齐。 可以是top, bottom, middle, alphabetic, hanging, ideographic