1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<html>
<head>
<style>
#rect {
width: 200px;
height: 100px;
position: absolute;
top: 50px;
left: 100px;
background-color: #fc0;
-moz-transform: matrix(1, -0.2, 0, 1, 0, 0);
-webkit-transform: matrix(1, -0.2, 0, 1, 0, 0);
-o-transform: matrix(1, -0.2, 0, 1, 0, 0);
-ms-transform: matrix(1, -0.2, 0, 1, 0, 0);
transform: matrix(1, -0.2, 0, 1, 0, 0);
border: 1px solid #000;
}
#rect2 {
background-color: #9aa;
border: 1px solid #000;
width: 300px;
height: 200px;
position: absolute;
top: 200px;
left: 0px;
-moz-transform: matrix(1, 0, 0.6, 1, 15em, 0);
-webkit-transform: matrix(1, 0, 0.6, 1, 250, 0);
-o-transform: matrix(1, 0, 0.6, 1, 250, 0);
-ms-transform: matrix(1, 0, 0.6, 1, 250, 0);
transform: matrix(1, 0, 0.6, 1, 250, 0);
}
#graphiccontainer {
position: absolute;
top: 0px;
left: 600px;
}
</style>
<!-- BEGIN EXAMPLE CODE -->
</head>
<body class="yui3-skin-sam">
<div id="rect"></div>
<div id="rect2"></div>
<div id="graphiccontainer"></div>
<script type="text/javascript">
YUI({filter:"raw"}).use('graphics', function(Y) {
var mygraphic,
myrect,
myrect2;
mygraphic = new Y.Graphic({render: "#graphiccontainer"});
type:"rect",
fill: {
color: "#fc0"
},
stroke: {
weight: 1,
color: "#000"
},
width: 200,
height: 100,
x: 100,
y: 50,
transform: "matrix(1, -0.2, 0, 1, 0, 0)"
});
type: "rect",
fill: {
color: "#9aa"
},
stroke: {
weight: 1,
color: "#000"
},
width: 300,
height: 200,
x: 0,
y: 200,
transform: "matrix(1, 0, 0.6, 1, 250, 0)"
});
});
</script>
</body>
</html>