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

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

Added Dojo 1.9.3 release.

File size: 1.3 KB
Line 
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">
11dojo.require("dojox.gfx");
12dojo.require("dojox.gfx.move");
13dojo.require("dojo.colors");
14
15createSurface = function(){
16        var surface = dojox.gfx.createSurface("test", 800, 600);
17        surface.whenLoaded(makeShapes);
18};
19
20makeShapes = 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
26dojo.addOnLoad(createSurface);
27
28</script>
29</head>
30<body>
31<h1>dojox.gfx Rounded rectangle</h1>
32The 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>
Note: See TracBrowser for help on using the repository browser.