dojox
Version:
Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.
34 lines (30 loc) • 1.09 kB
HTML
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title>Testing clipping on surface</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
@import "../../../dojo/resources/dojo.css";
@import "../../../dijit/tests/css/dijitTests.css";
</style>
<script src="../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script>
<script>
dojo.require("dojox.gfx");
createSurface = function(){
var surface = dojox.gfx.createSurface("test", 200, 200);
surface.whenLoaded(makeShapes);
};
makeShapes = function(surface){
surface.createRect({width: 200, height: 200}).setStroke("black");
surface.createRect({x: 150, y: 10, width: 300, height: 300}).setFill("red");
};
dojo.addOnLoad(createSurface);
</script>
</head>
<body>
<h1>Testing clipping on surface</h1>
<!--<p><button onclick="createSurface();">Go</button></p>-->
<div id="test"></div>
<p>That's all Folks!</p>
</body>
</html>