StageXL
StageXL copied to clipboard
Bug in Scale9Bitmap ?
if I build to javascript and visit on ipad(or iphone), will display a line in the bitmap.
is this a bug?
below is the sample:
html file
https://gist.github.com/darting/f5e47067e2754daa9c1e
dart file
https://gist.github.com/darting/40fd0c3b03cf1de072d4
button image

display in ipad
Looks like a bug :) I will take a look at it!
Are those "retina" iDevices? I've tried it on an old iPhone 4 and on a hi-dpi Android device and it works fine. Must be something with hi-dpi implementation of those iDevices.
Could you try to add this right at the start of your program - just to see the difference:
Stage.autoHiDpi = false;
I have tried it on iPhone4, if you zoomed in screen use two fingers, also can see this problem. BTW: i have set the autoHiDpi = false
Hi, do you find it in your device? or any other thing can I help you?
Hi,
Yes i have tried it and i can see it too. I looks like if Safari doesn't correctly align the coordinates of those scale9 tiles. I have tested it on Android too (Chrome and Firefox) and it works fine. I have also checked the math of the Scale9Bitmap and it looks correct. So we would need a workaround for Safari. We could draw the inner tiles a little bit bigger to avoid the gap, but this way you would get and overlapping effect when you apply an alpha <1 to the Scale9Bitmap. It would work to add some logic to round the coordinates before drawing the textures, but we haven't done this anywhere else in the library so i'm not very happy with it.
A little off topic and it does not solve the problem, but maybe you should add this to your html. Since you want a full screen canvas you probably want to disable zoom pinch:
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
okay, thanks very much.