Tuesday, September 11, 2012
Heart Assignment
<!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.moveTo(50, 300);
context.quadraticCurveTo(100, 200, 200, 300);
context.lineWidth = 20;
// line color
context.strokeStyle = "red";
context.stroke();
context.beginPath();
context.moveTo(200,300);
context.quadraticCurveTo(300, 200, 350, 300);
context.lineWidth = 20;
// line color
context.strokeStyle = "red";
context.stroke();
context.beginPath();
context.moveTo(50, 300);
context.bezierCurveTo(50, 500, 150, 425, 200, 500);
context.lineWidth = 20;
// line color
context.strokeStyle = "red";
context.stroke();
context.beginPath();
context.moveTo(350, 300);
context.bezierCurveTo(350, 500, 275, 425, 200, 500);
context.lineWidth = 20;
// line color
context.strokeStyle = "red";
context.stroke();
////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
};
</script>
</head>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment