Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

circle with canvas

const canvas = document.getElementById('myCanvas');
const context = canvas.getContext('2d');
const centerX = canvas.width / 2;
const centerY = canvas.height / 2;
const radius = 70;

context.beginPath();
context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);
context.fillStyle = 'green';
context.fill();
context.lineWidth = 5;
context.filter = 'blur(250px)'
context.strokeStyle = '#003300';
context.stroke();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #circle #canvas
ADD COMMENT
Topic
Name
4+4 =