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 make the PNG's transparent region not be listened by the EventListener when a touch event happened?
Corona SDK - group with image rect, wrong reference point
CORONA SDK Physics that dont affect every sprite
corona storyboard dispatch event error
Web view Background trasparency
Changing display Image when interacting to other display
Tap on display objects in Corona SDK
Tableviews “slide down” when tapped in Widget 2.0
Display long text in fixed frame in Corona
Sound delay on emulator in corona sdk
Corona Sdk frame number per second
What is the difference adding view directly without following code
Corona SDK Touch Phases - Touch and Hold
corona sdk - scene keep old items
adding objects to screen in corona sdk without defining x y coordinates? corona sdk
Where is the log printed when I use print(“”) in Corona Engine?