ImageRect differenz sizes in Editor and on Device

Hello Guys i have a strange problem.

I have 3 ImageRects with the same fixed size but in the editor and on my device they have a different size.

The width of them is 2 if i set the width to something bigger than 10 everybody looks the same but not if it is smaller ???

You are running into a content scaling issue.  This will happen with thin objects.  Let’s say you’ve set your config.lua to be 640x960 and you view it on a smaller screen.  We have to throw away some pixels to squeeze that larger content area into a smaller area and depending on positioning and such you might end up with a 2 pixel object looking like one pixel.

Can you post your config.lua and tell us what devices and simulator skin you’re using?

Rob

application = { content = { width = 768, height = 1024, scale = "Letterbox", fps = 60, --[[imageSuffix = { ["@2x"] = 2, }, --]] }, --[[-- Push notifications notification = { iphone = { types = { "badge", "sound", "alert", "newsstand" } } }, --]] }

ipad Mini but it also happen on my real Device : samsung tab 10.1 . what can i do to prevent it ? can i give them a minimum Width ? 

In the simulator, you are likely seeing this due to the zoom level of the simulator.  We tend to show the simulator at some fractional zoom so the whole skin is on the screen.  On a Mac do CMD + to zoom it in.  You may need to hit it a couple of times to get to 100%, hitting CMD - zooms it back out (on Windows its CTRL + and CTRL -).  If the simulator is running at 50% we are going to throw away half of the pixel rows and half of the pixel columns.  This makes thin lines show inconsistent.  When you are at 100% you should see what the device will show.

Now if you’re seeing this on device, this it’s likey the content scaling I mentioned above.  In your config.lua the “letterbox” should be all lowercase.  It should be picture perfect on the iPad Mini and iPad 2.  On the iPad 3+ and iPad Air models, the resolution is exactly double, so you should not see this issue on those iPads either.  But when you move to the phones or Android devices they won’t be 768x1024 exactly, so there will be some scaling involved.

Rob

You are running into a content scaling issue.  This will happen with thin objects.  Let’s say you’ve set your config.lua to be 640x960 and you view it on a smaller screen.  We have to throw away some pixels to squeeze that larger content area into a smaller area and depending on positioning and such you might end up with a 2 pixel object looking like one pixel.

Can you post your config.lua and tell us what devices and simulator skin you’re using?

Rob

application = { content = { width = 768, height = 1024, scale = "Letterbox", fps = 60, --[[imageSuffix = { ["@2x"] = 2, }, --]] }, --[[-- Push notifications notification = { iphone = { types = { "badge", "sound", "alert", "newsstand" } } }, --]] }

ipad Mini but it also happen on my real Device : samsung tab 10.1 . what can i do to prevent it ? can i give them a minimum Width ? 

In the simulator, you are likely seeing this due to the zoom level of the simulator.  We tend to show the simulator at some fractional zoom so the whole skin is on the screen.  On a Mac do CMD + to zoom it in.  You may need to hit it a couple of times to get to 100%, hitting CMD - zooms it back out (on Windows its CTRL + and CTRL -).  If the simulator is running at 50% we are going to throw away half of the pixel rows and half of the pixel columns.  This makes thin lines show inconsistent.  When you are at 100% you should see what the device will show.

Now if you’re seeing this on device, this it’s likey the content scaling I mentioned above.  In your config.lua the “letterbox” should be all lowercase.  It should be picture perfect on the iPad Mini and iPad 2.  On the iPad 3+ and iPad Air models, the resolution is exactly double, so you should not see this issue on those iPads either.  But when you move to the phones or Android devices they won’t be 768x1024 exactly, so there will be some scaling involved.

Rob