asked 212k views
0 votes
How to code the target logo on codehs

1 Answer

0 votes

Answer:

// Set up canvas

var canvas = document.getElementById('myCanvas');

var ctx = canvas.getContext('2d');

// Draw the Target logo

ctx.beginPath();

ctx.arc(200, 200, 150, 0, 2 * Math.PI, false);

ctx.fillStyle = '#e53b3b';

ctx.fill();

ctx.beginPath();

ctx.arc(200, 200, 120, 0, 2 * Math.PI, false);

ctx.fillStyle = '#fff';

ctx.fill();

ctx.beginPath();

ctx.arc(200, 200, 90, 0, 2 * Math.PI, false);

ctx.fillStyle = '#e53b3b';

ctx.fill();

ctx.beginPath();

ctx.arc(200, 200, 60, 0, 2 * Math.PI, false);

ctx.fillStyle = '#fff';

ctx.fill();

ctx.beginPath();

ctx.arc(200, 200, 30, 0, 2 * Math.PI, false);

ctx.fillStyle = '#e53b3b';

ctx.fill();

answered
User Tamel
by
7.9k points

Related questions

asked Oct 16, 2024 145k views
Galatians asked Oct 16, 2024
by Galatians
8.4k points
1 answer
2 votes
145k views
1 answer
4 votes
5.1k views
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.