Draws one or more circles. Will draw outline/fill depending on whether strokeStyle or fillStyle params are present in the drawing options.
strokeStyle
fillStyle
// Draw a circle with radius of 10 at 0,0circle(ctx, {radius:10});// Draw a circle of radius 10 at 100,100circle(ctx, {radius: 10, x: 100, y: 100});// Draw two blue outlined circlescircle(ctx, [ {radius: 5}, {radius: 10} ], {strokeStyle:`blue`}); Copy
// Draw a circle with radius of 10 at 0,0circle(ctx, {radius:10});// Draw a circle of radius 10 at 100,100circle(ctx, {radius: 10, x: 100, y: 100});// Draw two blue outlined circlescircle(ctx, [ {radius: 5}, {radius: 10} ], {strokeStyle:`blue`});
Drawing context
Circle(s) to draw
Drawing options
Draws one or more circles. Will draw outline/fill depending on whether
strokeStyle
orfillStyle
params are present in the drawing options.