| 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 |
|
| 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 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 |
|
| 40 |
dojo.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> |