Wednesday, September 12, 2012

Heart

My heart. Made with numbers and letters and whatnot.

CODE:
/*
<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");

////////////////////////////////////// start below this line ˇˇˇˇˇˇˇˇˇˇ

 context.beginPath();
 context.rect(0, 0, 800, 600);
  context.stroke();
 var grd = context.createLinearGradient(0, 250, 800, 250);
  grd.addColorStop(0, 'rgb(200, 190, 255)');
  grd.addColorStop(1, 'rgb(100, 100, 255)');
  context.fillStyle = grd;
  context.fill();
  context.stroke();


 context.beginPath();
  context.moveTo(400,200);
  context.bezierCurveTo(300, 0, 160, 220, 275, 315);
    context.quadraticCurveTo(350, 375, 400, 500);
    context.quadraticCurveTo(450, 375, 525, 315);
  context.bezierCurveTo(650, 200, 520, 0, 400, 200);
   context.lineCap = 'round';
   context.fillStyle = 'rgb(255, 0, 0)';
  context.fill();
    context.lineWidth = 19;
     context.strokeStyle = 'rgb(255, 160, 160)';
       context.stroke();

  //context.bezierCurveTo(300, 0, 160, 220, 400, 500);

  context.stroke();







////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ

};

</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>
*/

No comments:

Post a Comment