Use could scale the images based on a percentage of the DeviceWidth and/or height.
i.e, I need 6 columns to fit across the width of ANY size device, id do this.
local myImage:Image = LoadImage("thing.png") ' load an image
local split:Float = (DeviceWidth/6.0) ' assuming we want to fit 6 images across the width, so we split the width into 6
local imageBaseSize:Float = myImage.Width ' assumes width and height is the same
local scaleFactor:Float = (split/imageBaseSize) ' get scale we need to apply when drawing
local imageSizeAfterScale:Float = (scaleFactor*imageBaseSize) ' get the actual pixel width of the image when scaled
For local x:Int = 0 until 6
DrawImage(myImage,x*imageSizeAfterScale,y,0,scaleFactor,scaleFactor)
Next
|