1 | <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" > |
---|
2 | <head> |
---|
3 | <title>Testing rounded rectangle</title> |
---|
4 | <style type="text/css"> |
---|
5 | @import "../../../dojo/resources/dojo.css"; |
---|
6 | @import "../../../dijit/tests/css/dijitTests.css"; |
---|
7 | </style> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
9 | <script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script> |
---|
10 | <script type="text/javascript"> |
---|
11 | dojo.require("dojox.gfx"); |
---|
12 | dojo.require("dojox.gfx.move"); |
---|
13 | dojo.require("dojo.colors"); |
---|
14 | |
---|
15 | createSurface = function(){ |
---|
16 | var surface = dojox.gfx.createSurface("test", 800, 600); |
---|
17 | surface.whenLoaded(makeShapes); |
---|
18 | }; |
---|
19 | |
---|
20 | makeShapes = function(surface){ |
---|
21 | rect1 = surface.createRect({x: 20, y: 100, width: 300, height: 200, r: 50}).setFill("red").setStroke("black"); |
---|
22 | new dojox.gfx.Moveable(rect1); |
---|
23 | rect1 = surface.createRect({x: 0, y: 100, width: 300, height: 200, r: 50}).setFill("red").setStroke("black").setTransform(dojox.gfx.matrix.translate(350,0)).setShape({r:0}); |
---|
24 | }; |
---|
25 | |
---|
26 | dojo.addOnLoad(createSurface); |
---|
27 | |
---|
28 | </script> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | <h1>dojox.gfx Rounded rectangle</h1> |
---|
32 | The test should display 2 rectangles: the left one with round corners (radius=50), the right one with square corners (radius=0). |
---|
33 | <div id="test"></div> |
---|
34 | <p>That's all Folks!</p> |
---|
35 | </body> |
---|
36 | </html> |
---|