Cannot fit background image fully
So I am trying to fit my 350x570 image file fully as a background. But it's not working no matter what I do. Here's my code: display.setStatusBar(display.HiddenStatusBar) local background = display.newImageRect("background.png", display.contentWidth, display.contentHeight) background.x = display.contentCenterX background.y = display.contentCenterY and here's what I get: As shown in the image, there are two black bars because it's not fitted properly. But I don't know why. The code seems ok so what's the problem?
The internal coordinate system of Corona SDK depends on the content area defined in config.lua file. Point (0,0) is positioned at the top-left corner of this content area. If you are using the default Config.lua file then point (0,0) may not be positioned on the top-left corner of the screen. Tutorial on modernizing the config.lua https://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/ Ultimate Config.lua file https://gist.github.com/pkoperek/11156473
How to properly use store.* in conjunction with storyboard
How to set Corona notification big view
Set object or button above the video in corona sdk
selectively upgrade existing sqlite database in corona by comparing database versions
Corona Near Field Comunication (NFR)
How can i make random generated quotes
Using perspective library with Corona SDK
What is the right way to zoom the camera out from a scene view?
Corona SDK Runtime Error on version 3.0.0
corona loadRemoteImage loading in another scene
What is a simple splash screen code for corona?
How to resize pickerwheel on corona sdk
How to allow external music/audio to continue in Corona SDK apps when they launch?
Can I put apps made on Corona SDK for windows on IOS?
Define coordinates with rotation (corona sdk)
Open 3rd party application in corona sdk