fredsa / playn

Cross platform game library for N≥4 platforms
0 stars 1 forks source link

Call to drawImage causes error on iOS safari #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call drawImage(Image image, float dx, float dy, float dw, float dh, float 
sx, float sy, float sw, float sh) within the paint method of a Game
2. Deploy to HTML5
3. Bring up the page on iOS

What is the expected output? What do you see instead?
I expect to see the subset of the image. I see nothing instead. Other drawImage 
calls work as expected.

What version of the product are you using? On what operating system?
I am using PlayN-1.1. I have tested on Windows 7 Chrome 17.0.963.56 m and 
Android browser 4.0.2-235179 and received no errors. I've only gotten the error 
on iOS 5.0.1 (9A405) using the built-in safari browser. 

Please provide any additional information below.

JavaScript: Error
undefined
INDEX_SIZE_ERR: DOM Exception 1: Index or size was negative, or greater than 
the allowed value.

Original issue reported on code.google.com by colem...@gmail.com on 23 Feb 2012 at 3:37

GoogleCodeExporter commented 9 years ago
I also get the error when calling the ImageLayer method setSourceRect(float sx, 
float sy, float sw, float sh);

Original comment by colem...@gmail.com on 23 Feb 2012 at 4:09

GoogleCodeExporter commented 9 years ago
It appears this is because my source image is massive: 3852 x 1927. I'll find 
another way to implement that doesn't break things. Thanks for this awesome 
library!

Original comment by colem...@gmail.com on 23 Feb 2012 at 6:49

GoogleCodeExporter commented 9 years ago

Original comment by samskiv...@gmail.com on 23 Feb 2012 at 6:51