Image & Canvas canvasDrawArc

$canvasDrawArc

Draws an arc (outline) or pie slice (filled) using angle parameters in degrees

Syntax
$canvasDrawArc[x;y;radius;startAngle;endAngle;color;fill?;thickness?;container?]

Parameters

Parameter Type Required Default Description
x integer check_circle Required Center X coordinate
y integer check_circle Required Center Y coordinate
radius integer check_circle Required Arc radius in pixels
startAngle number check_circle Required Start angle in degrees (0° = right, 90° = down, -90° = up)
endAngle number check_circle Required End angle in degrees
color color check_circle Required Arc color
fill boolean Optional false true = filled pie slice, false = outline arc
thickness integer Optional 1 Outline thickness when fill is false
container string Optional Container name

Return Value

canvas

Modifies the canvas in-place.

Angles follow standard mathematical convention: 0° points right (3 o’clock), 90° points down (6 o’clock), and -90° points up (12 o’clock). The arc is drawn counterclockwise from startAngle to endAngle. When fill is true, the result is a wedge (pie slice) connected to the center. For full circles, prefer $canvasDrawCircle which is more efficient.

Examples

Pac-Man style pie slice

$canvasDrawArc[150;150;100;30;330;FFD700;true]

Outline arc

$canvasDrawArc[200;200;80;-90;90;E53935;false;3]