source: Dev/trunk/src/client/dojox/gfx/tests/test_pattern.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<!DOCTYPE html>
2<html>
3<head>
4<title>Testing pattern</title>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<style type="text/css">
7        @import "../../../dojo/resources/dojo.css";
8        @import "../../../dijit/tests/css/dijitTests.css";
9</style>
10<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug: true"></script>
11<!--<script type="text/javascript" src="../matrix.js"></script>-->
12<!--<script type="text/javascript" src="../vml.js"></script>-->
13<!--<script type="text/javascript" src="../svg.js"></script>-->
14<!--<script type="text/javascript" src="../silverlight.js"></script>-->
15<!--<script type="text/javascript" src="../canvas.js"></script>-->
16<script type="text/javascript">
17dojo.require("dojox.gfx");
18
19createSurface = function(){
20        var surface = dojox.gfx.createSurface("test", 800, 600);
21        surface.whenLoaded(makeShapes);
22};
23
24makeShapes = function(surface){
25    var pattern = {
26        type: "pattern",
27        x: 30, y: 20, width: 75, height: 60,
28        src: "images/eugene-sm.jpg"
29    };
30        var ellipse = {cx: 400, cy: 200, rx: 350, ry: 150};
31        surface.createEllipse(ellipse)
32        .setStroke({color: "blue", width: 1 })
33        .setFill(pattern);
34};
35
36dojo.addOnLoad(createSurface);
37
38</script>
39</head>
40<body>
41        <h1>dojox.gfx Pattern test</h1>
42<div id="test"></div>
43<p>That's all Folks!</p>
44</body>
45</html>
Note: See TracBrowser for help on using the repository browser.