<!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(255, 0, 20)';
context.fillStyle = 'rgb(255, 0, 80)';
context.moveTo(100, 90);
context.quadraticCurveTo(105,150, 200, 215);
context.quadraticCurveTo(290, 150, 300, 90);
context.quadraticCurveTo(260, 5, 200, 80);
context.quadraticCurveTo(140, 5, 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