Skip to content

$ellipse

Adds an elliptical arc to the current path.

Usage

$ellipse[canvas;x;y;radiusX;radiusY;rotation;startAngle;endAngle;counterclockwise?]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas.True
xNumberThe X coordinate of the elliptical arc.True
yNumberThe Y coordinate of the elliptical arc.True
radiusXNumberThe ellipse’s major-axis radius.True
radiusYNumberThe ellipse’s minor-axis radius.True
rotationNumberThe rotation of the ellipse, expressed in radians.True
startAngleNumberThe eccentric angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians.True
endAngleNumberThe eccentric angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians.True
counterclockwiseBooleanIf true, draws the ellipse counterclockwise (anticlockwise).False

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$ellipse",
"description": "Adds an elliptical arc to the current path.",
"params": [
{
"name": "canvas",
"description": "Name of the canvas.",
"type": "String",
"required": true
},
{
"name": "x",
"description": "The X coordinate of the elliptical arc.",
"type": "Number",
"required": true
},
{
"name": "y",
"description": "The Y coordinate of the elliptical arc.",
"type": "Number",
"required": true
},
{
"name": "radiusX",
"description": "The ellipse's major-axis radius.",
"type": "Number",
"required": true
},
{
"name": "radiusY",
"description": "The ellipse's minor-axis radius.",
"type": "Number",
"required": true
},
{
"name": "rotation",
"description": "The rotation of the ellipse, expressed in radians.",
"type": "Number",
"required": true
},
{
"name": "startAngle",
"description": "The eccentric angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians.",
"type": "Number",
"required": true
},
{
"name": "endAngle",
"description": "The eccentric angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians.",
"type": "Number",
"required": true
},
{
"name": "counterclockwise",
"description": "If true, draws the ellipse counterclockwise (anticlockwise).",
"type": "Boolean",
"required": false
}
],
"usage": "$ellipse[canvas;x;y;radiusX;radiusY;rotation;startAngle;endAngle;counterclockwise?]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/ellipse.ts",
"docs": "https://aoicanvas.vercel.app/functions/ellipse"
}