| 1 |
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" > |
| 2 |
<head> |
| 3 |
<title>Testing image 5</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 |
|
| 10 |
<meta name="svg.render.forceflash" content="true"/> |
| 11 |
<script src="svgweb/src/svg.js" data-path="svgweb/src"></script> |
| 12 |
<script src="../../../../dojo/dojo.js" data-dojo-config="isDebug:true,forceGfxRenderer:'svg'" type="text/javascript"></script> |
| 13 |
|
| 14 |
<script type="text/javascript"> |
| 15 |
dojo.require("dojox.gfx"); |
| 16 |
dojo.require("dojox.gfx.move"); |
| 17 |
dojo.require("dojo.colors"); |
| 18 |
|
| 19 |
makeShapes = function(){ |
| 20 |
var g = dojox.gfx, m = g.matrix; |
| 21 |
|
| 22 |
var grid_size = 800, grid_step = 50, |
| 23 |
surface = g.createSurface("test", 800, 600) |
| 24 |
/* SVGWEB { */ |
| 25 |
surface.whenLoaded(function() { |
| 26 |
for(var i = 0; i <= grid_size; i += grid_step){ |
| 27 |
surface.createLine({x1: 0, x2: grid_size, y1: i, y2: i}).setStroke("grey"); |
| 28 |
surface.createLine({y1: 0, y2: grid_size, x1: i, x2: i}).setStroke("grey"); |
| 29 |
} |
| 30 |
|
| 31 |
var rect1 = surface.createRect({x: 0, y: 0, width: 300, height: 200, r: 5}).setFill("red").setStroke("black"); |
| 32 |
var img1 = surface.createImage({width: 300, height: 200, src: "../images/eugene-sm.jpg"}).setTransform({dx: 50, dy: 50}); |
| 33 |
var rect2 = surface.createRect({x: 100, y: 100, width: 300, height: 200, r: 5}).setFill("yellow").setStroke("black"); |
| 34 |
var img2 = surface.createImage({width: 300, height: 200, src: "../images/eugene-sm.gif"}).setTransform({dx: 150, dy: 150}); |
| 35 |
var rect3 = surface.createRect({x: 200, y: 200, width: 300, height: 200, r: 5}).setFill("green").setStroke("black"); |
| 36 |
var img3 = surface.createImage({width: 300, height: 200, src: "../images/eugene-sm.png"}).setTransform({dx: 250, dy: 250}); |
| 37 |
var rect4 = surface.createRect({x: 300, y: 300, width: 300, height: 200, r: 5}).setFill("blue").setStroke("black"); |
| 38 |
|
| 39 |
new g.Moveable(rect1); |
| 40 |
new g.Moveable(rect2); |
| 41 |
new g.Moveable(rect3); |
| 42 |
new g.Moveable(rect4); |
| 43 |
|
| 44 |
new g.Moveable(img1); |
| 45 |
new g.Moveable(img2); |
| 46 |
new g.Moveable(img3); |
| 47 |
}); |
| 48 |
/* } */ |
| 49 |
}; |
| 50 |
|
| 51 |
dojo.addOnLoad(makeShapes); |
| 52 |
|
| 53 |
</script> |
| 54 |
</head> |
| 55 |
<body> |
| 56 |
<h1>dojox.gfx Image opacity and move tests</h1> |
| 57 |
<p>Note: Silverlight doesn't allow downloading images when run from a file system. This demo should be run from a server.</p> |
| 58 |
<div id="test"></div> |
| 59 |
<p>That's how images should look like (light yellow background):</p> |
| 60 |
<p style="background-color: #ffe; padding: 1em; border: 1px solid black;"> |
| 61 |
<img src="../images/eugene-sm.jpg"> |
| 62 |
<img src="../images/eugene-sm.gif"> |
| 63 |
<img src="../images/eugene-sm.png"> |
| 64 |
</p> |
| 65 |
<p>That's all Folks!</p> |
| 66 |
</body> |
| 67 |
</html> |