chapter7/tweetshirt.js
// This is where we'll set the background color
This is where we'll set the background color
This is where we ' ll set the background color
function fillBackgroundColor(canvas, context) {
	var selectObj = document.getElementById("backgroundColor");
	var index = selectObj.selectedIndex;
	var bgColor = selectObj[index].value;
	context.fillStyle = bgColor;
	context.fillRect(0, 0, canvas.width, canvas.height);
}
function fillBackgroundColor ( canvas , context ) { var selectObj = document . getElementById ( "backgroundColor" ) ; var index = selectObj . selectedIndex ; var bgColor = selectObj [ index ] . value ; context . fillStyle = bgColor ; context . fillRect ( 0 , 0 , canvas . width , canvas . height ) ; }
This is where we'll set the background color
This is where we ' ll set the background color