Create frown becomes a half-circle in javascript

<html>
    <head>
        <title>Frown</title>
            <script type="text/javascript">
                function init()
                {
                    var ctx =document.getElementById("canvas").getContext('2d');
                    ctx.beginPath();
                    ctx.strokeStyle = "rgb(200,0,0)";
                    ctx.arc(200, 200,50,0,Math.PI, true);
                    ctx.closePath();
                    ctx.stroke();
                }
            </script>
    </head>

    <body onLoad="init();">
        <canvas id="canvas" width="400" height="300">
            Your browser doesn't support the HTML5 element canvas.
        </canvas>
    </body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript