1 <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
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";
10 The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
11 <script type="text/javascript" src="Silverlight.js"></script>
13 <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
14 <!--<script type="text/javascript" src="../_base.js"></script>-->
15 <!--<script type="text/javascript" src="../shape.js"></script>-->
16 <!--<script type="text/javascript" src="../path.js"></script>-->
17 <!--<script type="text/javascript" src="../vml.js"></script>-->
18 <!--<script type="text/javascript" src="../svg.js"></script>-->
19 <!--<script type="text/javascript" src="../silverlight.js"></script>-->
20 <script type="text/javascript">
21 dojo.require("dojox.gfx");
23 makeShapes = function(){
24 var surface = dojox.gfx.createSurface(document.getElementById("test"), 500, 500);
25 var styles = ["none", "Solid", "ShortDash", "ShortDot", "ShortDashDot", "ShortDashDotDot",
26 "Dot", "Dash", "LongDash", "DashDot", "LongDashDot", "LongDashDotDot"];
27 var font = "normal normal normal 10pt Arial"; // CSS font style
28 var y_offset = dojox.gfx.normalizedLength("4pt");
29 for(var i = 0; i < styles.length; ++i){
31 surface.createText({x: 140, y: y + y_offset, text: styles[i], align: "end"}).setFont(font).setFill("black");
32 surface.createLine({x1: 150, y1: y, x2: 490, y2: y}).setStroke({style: styles[i], width: 3, cap: "round"});
36 dojo.addOnLoad(makeShapes);
41 <h1>dojox.gfx: Line style test</h1>
43 <p>That's all Folks!</p>