Utwórz Circle HTML Canvas
ctx.arc(x, y, radius, 0, Math.PI * 2);
ctx.fill();
Successful Sandpiper
ctx.arc(x, y, radius, 0, Math.PI * 2);
ctx.fill();
function drawCircle(point: Vector, radius: number) {
this.context.beginPath();
this.context.arc(point.x, point.y, radius, 0, Math.PI * 2);
this.context.fill();
this.context.stroke();
}
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();