"squirreltown" wrote:
If you use Texture Manager to grab the bitmap you can specify a size in pixels, but not percentage unfortunately. Otherwise, you'll need to create a blank bitmap at the desired size and draw the background into that using scaling.
"psatish" wrote:
Hi
I assume you mean using
DrawScaledObject(x as Integer, y as Integer, scaleX as Float, scaleY as Float, src as Object) as Boolean
But this function takes either a roBitmap or roRegion and source, it doesn' t take a file as source. In order to use this we need to get the file into bitmap first. So this wont work
function GetScaledImage(path, w, h)
bitmap = CreateObject("roBitmap", path)
if bitmap <> invalid
scaledBitmap = CreateObject("roBitmap", {width: w, height: h, AlphaEnable: true})
if scaledBitmap <> invalid
if scaledBitmap.DrawScaledObject(0, 0, w/bitmap.GetWidth(), h/bitmap.GetHeight(), bitmap) = true
return scaledBitmap
end if
end if
end if
return invalid
end function
"scorpiontahir02" wrote:"squirreltown" wrote:
If you use Texture Manager to grab the bitmap you can specify a size in pixels, but not percentage unfortunately. Otherwise, you'll need to create a blank bitmap at the desired size and draw the background into that using scaling.
I don't think so even roTextureManager can handle images larger than 2048x2048. Will have to pre-scale larger images server side.
"squirreltown" wrote:
I've done it, so I'm pretty sure it can.
"psatish" wrote:
Hi
I assume you mean using
DrawScaledObject(x as Integer, y as Integer, scaleX as Float, scaleY as Float, src as Object) as Boolean
But this function takes either a roBitmap or roRegion and source, it doesn' t take a file as source. In order to use this we need to get the file into bitmap first. So this wont work