Loading...
You can refer to the <ellipse> element of SVG.
The following example draws an ellipse with a center of [100, 100] and a radius of 100.
const ellipse = new Ellipse({style: {cx: 100,cy: 100,rx: 100,ry: 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> |
Horizontal radius of the ellipse
https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/rx
| Initial value | Applicable elements | Inheritable | Animatable | Computed value |
|---|---|---|---|---|
| '0' | - | no | yes | <percentage> <length> |
The vertical radius of the ellipse
https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/ry
| Initial value | Applicable elements | Inheritable | Animatable | Computed value |
|---|---|---|---|---|
| '0' | - | no | yes | <percentage> <length> |