added flashcanvas integration and some legacy IE bug fixes

This commit is contained in:
MoyuScript
2012-02-26 00:19:16 +02:00
parent f40c5ac1e0
commit dd0331fd81
8 changed files with 9121 additions and 57 deletions

View File

@@ -8,13 +8,17 @@
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript">
function setUp() {
var ctx = $('#testcanvas')[0].getContext('2d');
if ($('#testcanvas')[0].getContext) {
var ctx = $('#testcanvas')[0].getContext('2d');
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect (10, 10, 55, 50);
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (30, 30, 55, 50);
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
ctx.fillRect (30, 30, 55, 50);
} else {
$('#testcanvas').remove();
}
};
</script>
@@ -58,8 +62,8 @@
<img src="image.jpg" style="width:0px;height:0px;" />
<canvas id="testcanvas" style="width:100px;height:100px;"></canvas>
<br />
Image without src attribute, should not crash:
<br />
Image without src attribute, should not crash:
<img style="width:50px;height:50px;border:1px solid red;display:block;" />
</body>