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 ctxCanvasRenderingContext2D stylemodule:zrender/shape/Isogon~IIsogonStyle -
getRect(style){module:zrender/shape/Base~IBoundingRect}
shape/Isogon.js, line 108 -
计算返回正多边形的包围盒矩形
Name Type Description stylemodule:zrender/shape/Isogon~IIsogonStyle
Type Definitions
-
IIsogonStyleObject
-
Properties:
Name Type Argument Default Description xnumber 正n边形外接圆心x坐标
ynumber 正n边形外接圆心y坐标
rnumber 正n边形外接圆半径
nnumber 指明正几边形
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