Generation

generate functionThu, 24 Nov 2022

draw a circle on canvas

function drawCircle(canvas, x, y, radius, fillColor, lineColor) { c.beginPath(); c.arc(x, y, radius, 0, Math.PI * 2, false); if (fillColor) { c.fillStyle = fillColor; c.fill(); } if (lineColor) { c.strokeStyle = lineColor; c.stroke(); } }

Javascript
Generate More

Want to kickstart your project?Use the new AI Studio to create your code