Tuesday, September 11, 2012

Heart for homework


<!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.moveTo(200,200);
context.quadraticCurveTo(300, 100, 400, 200);
context.quadraticCurveTo(500, 100, 600, 200);
context.bezierCurveTo(700, 300, 500, 300, 400, 500);
context.bezierCurveTo(400, 500, 100, 300, 200, 200);
context.fillStyle = 'rgb(230,15,255)';
context.fill();
context.lineWidth = 5;
context.strokeStyle = 'rgb(82,184,214)';
context.stroke();







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

};

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

No comments:

Post a Comment