Line | |
---|
1 | <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" > |
---|
2 | <head> |
---|
3 | <title>Testing pattern</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 pattern = { |
---|
19 | type: "pattern", |
---|
20 | x: 0, y: 0, width: 75, height: 50, |
---|
21 | src: "../images/eugene-sm.jpg" |
---|
22 | }; |
---|
23 | var ellipse = {cx: 400, cy: 200, rx: 350, ry: 150}; |
---|
24 | var surface = dojox.gfx.createSurface("test", 800, 600); |
---|
25 | /* SVGWEB { */ |
---|
26 | surface.whenLoaded(function() { |
---|
27 | surface.createEllipse(ellipse) |
---|
28 | .setStroke({color: "blue", width: 1 }) |
---|
29 | .setFill(pattern); |
---|
30 | }); |
---|
31 | /* } */ |
---|
32 | }; |
---|
33 | |
---|
34 | dojo.addOnLoad(makeShapes); |
---|
35 | |
---|
36 | </script> |
---|
37 | </head> |
---|
38 | <body> |
---|
39 | <h1>dojox.gfx Pattern test</h1> |
---|
40 | <div id="test"></div> |
---|
41 | <p>That's all Folks!</p> |
---|
42 | </body> |
---|
43 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.