On Fri, Mar 12, 2010 at 1:43 PM, Fabien <phenxdes
...@gmail.com> wrote:
> Yep, you are missing something : reading the docs ;)
>
http://code.google.com/p/explorercanvas/wiki/Instructions > And sometimes, the initElement needs to be called even when the canvas
> tag already exists. There are also a few differences with the native
> implementation.
> On Mar 11, 12:32 am, tazz_ben <b...@wbpsystems.com> wrote:
> > So I was doing a basic test to present as a potential solution to
> > client and I wanted to show just that an image could be rotated and
> > with excanvas it would work on IE. While this code works on other
> > platforms, on IE 8, the Microsoft developer tools throws an error when
> > I try to access "getContext". Here is the code:
> > <!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-excanvas@googlegroups.com.
> To unsubscribe from this group, send email to
> google-excanvas+unsubscribe@googlegroups.com<google-excanvas%2Bunsubscribe@ googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-excanvas?hl=en.