Monday, September 10, 2012

My Heart!

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

////////////////////////////////////// start below this line ??????????


//Quadratic Curve
context.beginPath();
context.moveTo(315,400);
context.quadraticCurveTo(115, 5, 410, 230);
context.lineWidth = 19;
context.fillStyle = 'rgb(100, 25, 155)';
context.fill();
context.stroke();

//Quadratic Curve
context.beginPath();
context.moveTo(500,400)
context.quadraticCurveTo(715, 5, 410, 230);
context.lineWidth = 19;
context.fillStyle = 'rgb(200, 0, 155)';
context.fill();
context.stroke();

//Bezier Curve
context.beginPath();
context.moveTo(312,395);
context.bezierCurveTo(450, 600, 380, 580, 500, 399);
context.lineWidth = 19;
context.fillStyle = 'rgb(255, 0, 100)';
context.fill();
context.stroke();


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

};

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

No comments:

Post a Comment