source: Dev/trunk/src/client/dojox/gfx/tests/svgweb/test_poly.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 1.5 KB
Line 
1<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
2<head>
3<title>Testing polyline and line transforms</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">
15dojo.require("dojox.gfx");
16
17makeShapes = function(){
18        var surface = dojox.gfx.createSurface("test", 500, 500);
19        /* SVGWEB { */
20        surface.whenLoaded(function() {
21        var line = surface.createLine({x1: 250, y1: 50, x2: 250, y2: 250})
22                .setStroke({color: "blue"})
23                ;
24        var poly = surface.createPolyline([{x: 250, y: 250}, {x: 300, y: 300}, {x: 250, y: 350}, {x: 200, y: 300}, {x: 250, y: 250}])
25                .setStroke({color: "blue"})
26                ;
27        var rotate = dojox.gfx.matrix.rotategAt(5, 250, 250);
28        //var rotate = dojox.gfx.matrix.rotategAt(0.4, 250, 250);
29               
30        window.setInterval(function() {
31                        line.applyTransform(rotate);
32                        poly.applyTransform(rotate);
33                },
34                100
35        );
36        });
37        /* } */
38};
39
40dojo.addOnLoad(makeShapes);
41
42</script>
43</head>
44<body>
45<h1>dojox.gfx Polyline test</h1>
46<div id="test" style="width: 500px; height: 500px;"></div>
47<p>That's all Folks!</p>
48</body>
49</html>
Note: See TracBrowser for help on using the repository browser.