chapter7/tweetshirt.js
// Draws a circle at a random location
Draws a circle at a random location
Draws a circle at a random location
function drawCircle(canvas, context) {
	var radius = Math.floor(Math.random() * 40);
	var x = Math.floor(Math.random() * canvas.width);
	var y = Math.floor(Math.random() * canvas.height);
	context.beginPath();
	context.arc(x, y, radius, 0, degreesToRadians(360), true);
	context.fillStyle = "lightblue";
	context.fill();
}
function drawCircle ( canvas , context ) { var radius = Math . floor ( Math . random ( ) * 40 ) ; var x = Math . floor ( Math . random ( ) * canvas . width ) ; var y = Math . floor ( Math . random ( ) * canvas . height ) ; context . beginPath ( ) ; context . arc ( x , y , radius , 0 , degreesToRadians ( 360 ) , true ) ; context . fillStyle = "lightblue" ; context . fill ( ) ; }
Draws a circle at a random location
Draws a circle at a random location
// Use this fillStyle instead if you want to try // "twitter blue" //context.fillStyle = "rgb(0, 173, 239)";