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

Questions about programming?Chat with your personal AI assistant