file:///Users/clairelaing/Downloads/finalheart.html
<!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.lineCap = "round";
context.lineWidth = 8;
context.strokeStyle = 'rgb(190, 0, 190)';
context.fillStyle = 'rgb(190, 0, 190)';
context.moveTo(100, 90);
context.quadraticCurveTo(100,120, 200, 215);
context.quadraticCurveTo(260, 150, 300, 90);
context.quadraticCurveTo(250, 2, 200, 80);
context.quadraticCurveTo(140, 2, 100, 90);
context.stroke();
context.fill();
////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
};
</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>
No comments:
Post a Comment