Sunday, September 8, 2013

Heart


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

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

grid = context.createRadialGradient(250, 500, 350, 380, 330, 50)
context.beginPath();
context.moveTo(600, 650);
context.lineTo(475, 550);
context.bezierCurveTo(355, 450, 510, 300, 600, 425);
context.bezierCurveTo(690, 300, 845, 450, 725, 550);
context.lineTo(600, 650);
context.closePath();
grid.addColorStop(0, 'rgb(150, 90, 90)');
grid.addColorStop(1, 'rgb(200, 30, 30)');
context.fillStyle = grid;
context.fill();
context.strokeStyle = 'rgb(255, 0, 0)';
context.lineWidth = 10;
context.stroke();

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

};

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

No comments:

Post a Comment