My Heart !
<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
////////////////////////////////////// start below this line ??????????
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
////////////////////////////////////// start below this line ??????????
//heart
context.beginPath();
context.moveTo(300,200);
context.quadraticCurveTo(560, 70, 300, 410);
context.quadraticCurveTo(50, 70, 300, 200);
//color
context.fillStyle = 'rgb(100,50,200)';
context.fill();
//linecolor
context.strokeStyle = 'pink';
//linecap
context.lineCap = 'round';
//width
context.lineWidth = 10;
context.stroke();
context.beginPath();
context.moveTo(300,200);
context.quadraticCurveTo(560, 70, 300, 410);
context.quadraticCurveTo(50, 70, 300, 200);
//color
context.fillStyle = 'rgb(100,50,200)';
context.fill();
//linecolor
context.strokeStyle = 'pink';
//linecap
context.lineCap = 'round';
//width
context.lineWidth = 10;
context.stroke();
////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
};
</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>
};
</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>
No comments:
Post a Comment