Create Ellipse : Canvas Draw « Dojo toolkit « JavaScript DHTML






Create Ellipse

 
<html>
  <head>
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojox.gfx");
      function testIt() {
        var s = dojox.gfx.createSurface("my", 320, 240);
         s.createEllipse({ cx : 160, cy : 190, rx : 30, ry : 40 }).setFill([0, 255, 0, 0.5]);
      }
    </script>
  </head>
  <body onLoad="testIt();">
        <div id="my"></div>
  </body>
</html>
       

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Draw 3D ball
2.Draw line
3.Draw polygon
4.Draw rectangle
5.Draw stroke
6.Draw text
7.Fill text
8.Shape rotation