Debian Codegraph @

dojox/gfx/tests/svgweb/test_linestyle.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>Dojo Unified 2D Graphics</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(document.getElementById("test"), 500, 500);
19 /* SVGWEB { */
20 surface.whenLoaded(function() {
21 var styles = ["none", "Solid", "ShortDash", "ShortDot", "ShortDashDot", "ShortDashDotDot",
22 "Dot", "Dash", "LongDash", "DashDot", "LongDashDot", "LongDashDotDot"];
23 var font = "normal normal normal 10pt Arial"; // CSS font style
24 var y_offset = dojox.gfx.normalizedLength("4pt");
25 for(var i = 0; i < styles.length; ++i){
26 var y = 20 + i * 20;
27 surface.createText({x: 140, y: y + y_offset, text: styles[i], align: "end"}).setFont(font).setFill("black");
28 surface.createLine({x1: 150, y1: y, x2: 490, y2: y}).setStroke({style: styles[i], width: 3, cap: "round"});
29 }
30 });
31 /* } */
32 };
33
34 dojo.addOnLoad(makeShapes);
35
36 </script>
37 </head>
38 <body>
39 <h1>dojox.gfx: Line style test</h1>
40 <div id="test"></div>
41 <p>That's all Folks!</p>
42 </body>
43 </html>