test_pattern.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. <!--
  10. The next line should include Microsoft's Silverligth.js, if you plan to use the silverlight backend
  11. <script type="text/javascript" src="Silverlight.js"></script>
  12. -->
  13. <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
  14. <!--<script type="text/javascript" src="../matrix.js"></script>-->
  15. <!--<script type="text/javascript" src="../vml.js"></script>-->
  16. <!--<script type="text/javascript" src="../svg.js"></script>-->
  17. <!--<script type="text/javascript" src="../silverlight.js"></script>-->
  18. <!--<script type="text/javascript" src="../canvas.js"></script>-->
  19. <script type="text/javascript">
  20. dojo.require("dojox.gfx");
  21. makeShapes = function(){
  22. var pattern = {
  23. type: "pattern",
  24. x: 0, y: 0, width: 333, height: 80,
  25. src: "http://dojotoolkit.org/files/downloadButton.gif"
  26. };
  27. var ellipse = {cx: 400, cy: 200, rx: 350, ry: 150};
  28. var surface = dojox.gfx.createSurface("test", 800, 600);
  29. surface.createEllipse(ellipse)
  30. .setStroke({color: "blue", width: 1 })
  31. .setFill(pattern);
  32. };
  33. dojo.addOnLoad(makeShapes);
  34. </script>
  35. </head>
  36. <body>
  37. <h1>dojox.gfx Pattern test</h1>
  38. <div id="test"></div>
  39. <p>That's all Folks!</p>
  40. </body>
  41. </html>