new require("zrender/shape/Isogon")(options)
shape/Isogon.js, line 46
Name | Type | Description |
---|---|---|
options |
Object |
正多边形
Members
-
highlightStylemodule:zrender/shape/Isogon~IIsogonStyle
-
多边形高亮绘制样式
-
多边形绘制样式
Methods
-
buildPath(ctx, style)
shape/Isogon.js, line 68 -
创建n角星(n>=3)路径
Name Type Description ctx
CanvasRenderingContext2D style
module:zrender/shape/Isogon~IIsogonStyle -
getRect(style){module:zrender/shape/Base~IBoundingRect}
shape/Isogon.js, line 108 -
计算返回正多边形的包围盒矩形
Name Type Description style
module:zrender/shape/Isogon~IIsogonStyle
Type Definitions
-
IIsogonStyleObject
-
Properties:
Name Type Argument Default Description x
number 正n边形外接圆心x坐标
y
number 正n边形外接圆心y坐标
r
number 正n边形外接圆半径
n
number 指明正几边形
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