I have written the code below after following a tutorial on YouTube, however I have had to adapt what was been taught slightly in order to get the code to perform as I wanted.
My goal was to make sure that the background filled the device/simulator screen for all devices.
I seem to have achieved my goal and the background fills out the entire device/simulator screen.
Is this the write way to achieve this? Can anyone see a problem with working this way?
Many thanks for reading my post. I’m very, very new to Corona and programming in general so please excuse me if this is totally incorrect
[code]
local _H = display.contentHeight;
local _W = display.contentWidth;
local background = display.newImageRect(“images/background.png”,_W,_H);
background:setReferencePoint(display.CenterReferencePoint);
background.x = _W/2; background.y = _H/2
[import]uid: 173546 topic_id: 30296 reply_id: 330296[/import]
Is background.png a solid color? Will it be hurt by being stretched to fit? (mostly impacts circle shapes as they turn out oval)
but for the most part that should work. [import]uid: 19626 topic_id: 30296 reply_id: 121345[/import]
Hey there, that was a very quick reply… Thank You
No it’s an actual photograph however it doesn’t appear stretched at all? You would think it would.
There does however seem to be a larger black void (larger than the iphone) up the left and right of the screen when using the ipad simulator. (this may be normal, I don’t have an actual ipad device to test the program on.
Thanks again,
Chris [import]uid: 173546 topic_id: 30296 reply_id: 121349[/import]
Is background.png a solid color? Will it be hurt by being stretched to fit? (mostly impacts circle shapes as they turn out oval)
but for the most part that should work. [import]uid: 19626 topic_id: 30296 reply_id: 121345[/import]
Hey there, that was a very quick reply… Thank You
No it’s an actual photograph however it doesn’t appear stretched at all? You would think it would.
There does however seem to be a larger black void (larger than the iphone) up the left and right of the screen when using the ipad simulator. (this may be normal, I don’t have an actual ipad device to test the program on.
Thanks again,
Chris [import]uid: 173546 topic_id: 30296 reply_id: 121349[/import]