Image & Canvas canvasDrawCircle

$canvasDrawCircle

Draws a circle (filled or outlined) with optional blend mode support

Syntax
$canvasDrawCircle[x;y;radius;color;fill;blend?;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 Circle radius in pixels
color color check_circle Required Fill or outline color
fill boolean check_circle Required true = filled circle, false = outline only
blend string Optional Blend mode for per-pixel blending
multiply screen overlay darken lighten difference hardLight softLight
container string Optional Container name for relative positioning

Return Value

canvas

Modifies the canvas in-place. When blend is specified, uses per-pixel blending instead of the fast-path fill/draw.

Circles are drawn using the midpoint algorithm for pixel-precise rendering. When fill is true, the circle is filled solid; when false, only a 1-pixel outline is drawn. Specifying a blend mode triggers per-pixel blending instead of the default fast-path, which may be slightly slower but enables compositing effects like multiply, screen, and overlay.

Examples

Filled circle

$canvasCreate[dots;400;300;white]
$canvasDrawCircle[200;150;80;E53935;true]
$attachImage[dots]

Outlined circle with blend

$canvasDrawCircle[200;150;80;FFD700;false;multiply]

Multiple circles (decorative)

$canvasCreate[pattern;400;400;transparent]
$canvasDrawCircle[100;100;40;E53935;true]
$canvasDrawCircle[200;100;40;1E88E5;true]
$canvasDrawCircle[300;100;40;43A047;true]
$attachImage[pattern]