JonazMartinez / explorercanvas

Automatically exported from code.google.com/p/explorercanvas
Apache License 2.0
0 stars 0 forks source link

drawImage positioning error #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the latest version of excanvas (r3) on a PC and have a problem in 
IE6, 7 and 8 trying to position 2 images next to each other.

In my test case, the canvas has a width of 512px and height of 256px. I 
want to fit 2 images of 256 x 256 pixels next to each other, but IE the 
second image is shifted to the right.

Code:

<html>
<head>
<title></title>

<!--[if IE]><script src="excanvas.js"></script><![endif]-->
<script type="text/javascript">

function drawIt() {
  var canvas = document.getElementById("can"),
      ctx;

  if (canvas.getContext) {
    ctx = canvas.getContext("2d");
    ctx.drawImage(document.getElementById("img1"), 0, 0);
    ctx.drawImage(document.getElementById("img2"), 256, 0);
  }
}
</script>

</head>

<body>
  <a id="clickme" href="javascript:drawIt();">Click Me</a>
  <br/>

  <canvas id="can" width="512" height="256"></canvas>

  <br/>
  <img id="img1" src="img1.jpg"/>
  <img id="img2" src="img2.jpg"/>

</body>
</html>

Please help!
Regards, Lincoln

Original issue reported on code.google.com by lincolnc...@gmail.com on 8 May 2009 at 12:54

Attachments:

GoogleCodeExporter commented 9 years ago
r3 is not the latest version. Please check with the latest version in SVN since 
this should 
have been fixed.

Original comment by erik.arv...@gmail.com on 10 May 2009 at 1:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
It's somewhat irksome, however, that as of November 10, 2009, R3 is still the 
latest
version available on the downloads page.   I can confirm the bug fixed in r69, 
however.

Original comment by AaronGoo...@gmail.com on 10 Nov 2009 at 6:44