Tuesday, 15 September 2015

lua - Scale image to display.contentWidth,display.contentHeight -


How do I scale the image to the size of the screen?

Whatever I have tried:

  Image: Scale (display contentWidth, display.contentHeight)    

You can use it to fit the image on your screen

  local screen_setting = 1 local Background = display NYImage ("Objects / BG Page", correct) background.xScale = (Screen_adjustment * background.contentWidth) /background.contentWidth background.yScale = background.xScale Background X = display.contentWidth / 2 background.y = display.contentHeight / 2   

Just change the value of Screen_adjustment to fit your screen

No comments:

Post a Comment