Using display.newImageRect( …) to display an image but I need to rotate landscape images. How can I do this?
local bg = display.newImageRect( _G.whichImage, system.TemporaryDirectory, display.contentWidth,display.contentHeight)
Using display.newImageRect( …) to display an image but I need to rotate landscape images. How can I do this?
local bg = display.newImageRect( _G.whichImage, system.TemporaryDirectory, display.contentWidth,display.contentHeight)
Not clear what you mean by ‘rotate landscape image’, but any display object can be rotated by changing the ‘rotation’ field:
bg.rotation = 45 -- rotate to 45 degrees
Thanks for the information! Yes, this rotates the image. Now I need to center the image and squeeze the image into the display dimensions. How can I do this?
Center where, and what dimensions?
Take a look at the display properties. Maybe that will help.
Not clear what you mean by ‘rotate landscape image’, but any display object can be rotated by changing the ‘rotation’ field:
bg.rotation = 45 -- rotate to 45 degrees
Thanks for the information! Yes, this rotates the image. Now I need to center the image and squeeze the image into the display dimensions. How can I do this?
Center where, and what dimensions?
Take a look at the display properties. Maybe that will help.