Progress of Project 2

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title> ASHLEY BALDINO </title>
<style type="text/css">


body,td,th {
font-family: Helvetica, Arial, sans-serif;
font-size: 12px;
color: rgba(0,0,0,1);
}


body {
background-color: rgba(255,255,255,1);
}


#myCanvas { border: rgba(102,0,255,1) medium dashed; }


</style>


</head>

<body>

<canvas id="myCanvas" width="800" height="600"></canvas>

<script>


var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');

//// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> YOUR CODE STARTS HERE

context.beginPath();
   
context.rect(1, 0, 800, 800);
      // add linear gradient
   
var grd = context.createLinearGradient(0, 0, canvas.width, canvas.height);
      // light blue
   
grd.addColorStop(0, '#8ED6FF');  
      // dark blue
   
grd.addColorStop(.5, '#004CB3');
   
grd.addColorStop(1, 'navy');

context.fillStyle = grd;
   
context.fill();
   
context.lineWidth = 7;
   
context.strokeStyle = 'black';
   
context.stroke();

context.beginPath();
   
context.rect(200, 300, 400, 600);
   
var grd = context.createLinearGradient(0, 0, canvas.width, canvas.height);
      // light blue
   
grd.addColorStop(0, 'tan');  
      // dark blue
   
grd.addColorStop(.5, 'brown');
   
grd.addColorStop(1, 'navy');

context.fillStyle = grd;
   
context.fill();
   
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'grey';
   
context.stroke();

// begin custom shape
context.beginPath();
     
context.moveTo(170, 80);
   
context.bezierCurveTo(130, 100, 130, 150, 230, 150);
   
context.bezierCurveTo(250, 180, 320, 180, 340, 150);
   
context.bezierCurveTo(420, 150, 420, 120, 390, 100);
   
context.bezierCurveTo(430, 40, 370, 30, 340, 50);
   
context.bezierCurveTo(320, 5, 250, 20, 250, 50);
   
context.bezierCurveTo(200, 5, 150, 20, 170, 80);

      // complete custom shape
     
context.closePath();
   
context.lineWidth = 5;
   
context.fillStyle = 'white'

context.fill();

context.strokeStyle = 'white';
   
context.stroke();

//door
 context.beginPath();
   
context.rect(360, 500, 75, 300);
     
context.fillStyle = 'grey';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

//windows
 context.beginPath();
   
context.rect(250, 450, 50, 100);
     
context.fillStyle = 'grey';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

 context.beginPath();
   
context.rect(500, 450, 50, 100);
     
context.fillStyle = 'grey';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

 context.beginPath();
   
context.rect(300, 360, 200, 60);
     
context.fillStyle = '#903040';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

 context.beginPath();
   
context.rect(315, 365, 175, 50);
     
context.fillStyle = '#703040';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

context.beginPath();
     
context.moveTo(400, 500);
     
context.lineTo(400, 600);

context.fillStyle = 'grey'

context.lineWidth = 2
     
context.stroke();

context.font = 'italic 40pt Calibri';

context.fillStyle = 'white'

    context.fillText('studio!', 325, 410);

//roof
 context.beginPath();
   
context.rect(175, 280, 450, 20);
     
context.fillStyle = 'black';
     
context.fill();
     
context.lineWidth = 1;
     
context.strokeStyle = 'black';
   
context.stroke();

// window lines
context.beginPath();
     
context.moveTo(525, 450);
     
context.lineTo(525, 550);

context.lineWidth = 2
     
context.stroke();

context.beginPath();
     
context.moveTo(500, 500);
     
context.lineTo(550, 500);

context.lineWidth = 2
     
context.stroke();

context.beginPath();
     
context.moveTo(275, 450);
     
context.lineTo(275, 550);

context.lineWidth = 2
     
context.stroke();

context.beginPath();
     
context.moveTo(250, 500);
     
context.lineTo(300, 500);

context.lineWidth = 2
     
context.stroke();
//// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< YOUR CODE ENDS HERE


// CHANGE THE CREDITS

context.beginPath();
context.font = 'bold 20px Arial';
context.fillStyle = "rgba(0,0,0,1)";
context.fillText('Ashley Baldino', 550, 30);
context.closePath();

</script>



</body>
</html>

Comments