Circle
Previous
Text
Next
Ellipse
Loading...
You can refer to the <circle> element of SVG.
The following example draws a circle with a center of [100, 100]
and a radius of 100
.
const circle = new Circle({style: {cx: 100,cy: 100,r: 100,},});
Inherits style property from DisplayObject.
The default value is [0.5, 0.5]
. For details, see DisplayObject's anchor.
The default value is center
. For details, see DisplayObject's transformOrigin.
The x-axis coordinates of the center of the circle in the local coordinate system.
https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/cx
Initial value | Applicable elements | Inheritable | Animatable | Computed value |
---|---|---|---|---|
'0' | - | no | yes | <percentage> <length> |
The y-axis coordinates of the center of the circle in the local coordinate system.
https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/cy
Initial value | Applicable elements | Inheritable | Animatable | Computed value |
---|---|---|---|---|
'0' | - | no | yes | <percentage> <length> |
The radius of the circle.
https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/r
Initial value | Applicable elements | Inheritable | Animatable | Computed value |
---|---|---|---|---|
'0' | - | no | yes | <percentage> <length> |