Debian Codegraph @

dojox/gfx/tests/svgweb/test_fill.html

raw symbols SCIP
1 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
2 <head>
3 <title>Testing fill rule</title>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <style type="text/css">
6 @import "../../../../dojo/resources/dojo.css";
7 @import "../../../../dijit/tests/css/dijitTests.css";
8 </style>
9 <!-- SVGWEB { -->
10 <meta name="svg.render.forceflash" content="true"/>
11 <script src="svgweb/src/svg.js" data-path="svgweb/src"></script>
12 <script src="../../../../dojo/dojo.js" data-dojo-config="isDebug:true,forceGfxRenderer:'svg'" type="text/javascript"></script>
13 <!-- } -->
14 <script type="text/javascript">
15 dojo.require("dojox.gfx");
16
17 makeShapes = function(){
18 var surface = dojox.gfx.createSurface("test", 500, 500);
19 /* SVGWEB { */
20 surface.whenLoaded(function() {
21 var path = surface.createPath("");
22 // form concentric circles
23 var center = {x: 250, y: 250};
24 for(var r = 200; r > 0; r -= 30){
25 // make two 180 degree arcs to form a circle
26 var start = {x: center.x, y: center.y - r};
27 var end = {x: center.x, y: center.y + r};
28 path.moveTo(start).arcTo(r, r, 0, true, true, end).arcTo(r, r, 0, true, true, start).closePath();
29 }
30 // set visual attributes
31 path.setFill("red").setStroke("black");
32 });
33 /* } */
34 };
35
36 dojo.addOnLoad(makeShapes);
37
38 </script>
39 </head>
40 <body>
41 <h1>Testing fill rule</h1>
42 <div id="test" style="width: 500px; height: 500px;"></div>
43 <p>That's all Folks!</p>
44 </body>
45 </html>