3

I'm trying to create a small drawing application for android browsers. However I've got issues when trying to erase a bitmap using globalCompositeOperation = "destination-out", it simply does not work on the Samsung Galaxy S3

The exact same code works fine on the HTC ONE X with android 4.1.1

I've found a similar issue here http://code.google.com/p/android/issues/detail?id=39183 but no solution. The example behaves exactly as my code on SGS3 and ONEx

Any idea what could be wrong? is it a SGS3 only issue?

Andreas
  • 51
  • 2
  • What I have found is that the canvas does not update correctly on the SGS3. However if i move the canvas it will update. This solution is really slow and is not an real option. – Andreas Jan 16 '13 at 09:39

1 Answers1

3

I meet it too, but when i use toDataURL, the image i got is right. it maybe because the browser does not render the canvas at the moment, so i change the css, change its margin-right in 0px and 1px,then it work.

$(this.canvas).css('margin-right', $(this.canvas).css('margin-right') == "0px" ? "1px" : "0px");
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
delsen_web
  • 31
  • 2