Hi guys, I’ve got a weird error that is occurring with a handful of the graphics in my game.
EDIT: The graphics are not being displayed at their true dimensions. For some reason they are being re-sized.
[lua]
road = display.newImage(“Road_Back_Cliff.png”)
road.x = display.contentWidth/2
road.x = display.contentHeight/2
background = display.newImage(“background1.png”)
background.x = display.contentWidth/2
background.y = display.contentHeight/2
print(display.contentWidth)
print(road.width)
print(background.width)
[/lua]
terminal:
1536 – screen width
1024 – road width
768 – background width
However, those aren’t the actual dimensions of those graphics.
“Road_Back_Cliff.png”
The actual image dimensions 1536x599
The displayed dimensions 1024x399
If I scale this image by 1.5 it displays at the size it is suppose to be when it is not scaled.
“background1.png”
The actual image dimensions 1536x2048
The displayed image dimensions 768x1024
If I scale this image by 2 it displays at the size it is suppose to be when it is not scaled.
I have no idea why this is happening. For the images it is happening to I can easily fix it by scaling them.
This problem does not show up on the simulator for Windows.
The mac I’m using does not have the latest os could that be the problem?
Any ideas? Thanks