Content Scaling have a circle that is border to border on all devices

It’s been a while since I posted and moved beyond being a noob, and being a semi noob :slight_smile:
Here is what I am trying to do:

In the code below, I have a circle. I want to have the ability to have the circle touch edge to edge on an iPhone 3gs (480x320) iPhone4/4s (960x640) and finally Ipad/ipad2 (1024x768)

The problem is on the iPhone 3gs/4 the circle touches to edge - on the iPad there is a gap between the edge and the circle.

Is there some kind of logic I can build in to prevent this, or is it something I can tackle in the config.lua, build settings etc?
Thanks, I know it’s kind of a simple question but this thing is giving me trouble!
Here is my main file, it’s DEAD simple!

  
display.setStatusBar( display.HiddenStatusBar )  
  
 --shorcut variables to call the content width and height  
 local \_W = display.contentWidth  
 local \_H = display.contentHeight   
  
local circle = display.newCircle (\_W/2, \_H/2,160)  
  

config.lua

application =  
{  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "Letterbox",  
 fps = 60,  
 antialias = true,  
  
 imageSuffix =  
 {  
 ["@2x"] = 2,  
 },  
 },  
}  
  

and finally the build settings

  
settings =  
{  
orientation =  
{  
default ="portrait",  
supported =  
{  
"portrait"  
},  
},  
}  
  

**Edit**

I also tried in the config.lua 1024x768 - that works FINE, but I’ve heard I should scale up instead of down? I don’t know how the cool kids do it :slight_smile: [import]uid: 61600 topic_id: 17985 reply_id: 317985[/import]

Hi Nick,

The reason to scale up rather than down is because if you were scaling down an iPad sized background on say, a 3G/S, that would be pretty intensive compared to using a 320x480 image.

For the circle, because of the iPad being a tad “squarer” than the iPhone it wont work out quite right - however you could easily do a check to see if the device was an iPad and if so adjust the circle’s position accordingly.

Does that help?

Peach :slight_smile: [import]uid: 52491 topic_id: 17985 reply_id: 68697[/import]

http://developer.anscamobile.com/forum/2011/11/16/howto-backgrounds-no-black-borders-appleandroid-devices

This might help you :slight_smile: [import]uid: 13097 topic_id: 17985 reply_id: 68719[/import]