Tuesday, September 11, 2012

Digital Arts Heart

/* <!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.rect(0, 0, 800, 600);
        context.fillStyle = 'rgb(0,0,0)';
        context.fill();
        context.lineWidth = 10;
        context.strokeStyle = 'black';
        context.stroke();


context.beginPath();
        context.moveTo(400, 300);
        context.quadraticCurveTo(200, 50, 400, 155);
        context.lineWidth = 10;
         context.fillStyle = 'rgb(80,255,100)';
        context.fill();
        // line color
        context.strokeStyle = "rgb(200,0,150)";
        context.stroke();
     
//Arch2
context.beginPath();
        context.moveTo(400, 300);
        context.quadraticCurveTo(600, 50, 400, 155);
        context.lineWidth = 10;
         context.fillStyle = 'rgb(80,255,100)';
        context.fill();
        // line color
        context.strokeStyle = "rgb(200,0,150)";
        context.stroke();





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

};

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

No comments:

Post a Comment