Skip to content

Ellipse

The ellipse() method is used to create an ellipse.

ParameterDescription
cxThe x coordinate of the center of the ellipse.
cyThe y coordinate of the center of the ellipse.
rxThe x radius of the ellipse.
ryThe y radius of the ellipse.

Example

ts
const ctx = node.getComponent(Graphics);
ctx.ellipse(200,100, 200,100);
ctx.stroke();

ellipse.png


Return to the Graphics Component Reference documentation.