Hi,
I finally could get newImageRect to show image fullscreen on the simulator with manually changing it’s x and y and setting it to half of display.contentHeight and display.contentWidht respectfully.
My question is, am I doing the right thing here? Because setting it’s x and y manually is awkward because I believe default anchor point is top left for display images. And besides, background:setReferencePoint(display.CenterReferencePoint);
doesn’t seem to affect it.
My whole code to load a background in multi-resolutions:
local _H = display.contentHeight;
local _W = display.contentWidth;
local background = display.newImageRect(“background.png”,_W,_H);
–background:setReferencePoint(display.CenterReferencePoint);
background.x = _W/2; background.y = _H/2
and I would like to know if we have to set x and y for that object or there is a better setting to do somewhere to fix this automatically. I tried:
xAlign = “left”,
yAlign = “top”,
in config.lua, but that didn’t solve this.
Thanks! [import]uid: 206803 topic_id: 34397 reply_id: 334397[/import]