<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!--[if IE]>
<script type="text/javascript" src="excanvas.js"></script>
<![endif]-->
</head>
<body>
<canvas id="testimage" width="150" height="150"></canvas>
<script type="text/javascript">
var canvasimage = {};
canvasimage.canvas = function (canvasid){
var canvasid = canvasid || "testimage";
var canvas = document.getElementById(canvasid);
var ctx = canvas.getContext('2d');
return ctx;
}();
canvasimage.loadpng = function (){
var img = new Image();
img.onload = function(){
canvasimage.canvas.drawImage(img,0,0);
};
img.src = 'test.png';
return img;
}();
canvasimage.rotate = function(degree){
canvasimage.canvas.rotate(Number(degree) * Math.PI / 180);
};
canvasimage.rotate(15);
// canvasimage.rotate(-15);
</script>
</body>
</html>
Please tell me I'm missing something, without the getContext method,
I'm not sure how excanvas has much value.
--
You received this message because you are subscribed to the Google Groups "google-excanvas" group.
To post to this group, send email to google-...@googlegroups.com.
To unsubscribe from this group, send email to google-excanv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-excanvas?hl=en.