Scaling the TileImage command
BlitzMax Forums/BlitzMax Beginners Area/Scaling the TileImage command
| ||
I have an image I am tiling using TileImage and I want to scale it, how can I do this? Apparently SetScale doesn't affect TileImage! |
| ||
looking at the source of the TileImage command, it has this:blitz2d_driver.SetTransform 1,0,0,1 so it's overriding any transform settings you are using. You would probably have to rewrite the function to take into account scale. |
| ||
I know this is an old thread, but I just added a function to the Code Archives to include the current scale and rotation. http://www.blitzbasic.com/codearcs/codearcs.php?code=1842 |
| ||
Hi Maybe this function could help you. Function TileImage2(Image:TImage, X:Float=0, Y:Float=0, SX:Float=1.0, SY:Float=1.0, Frame:Int=0) Local TempWidth, TempHeight TempWidth = Image.Width TempHeight = Image.Height Image.Width:*SX Image.Height:*SY TileImage(Image, X, Y, Frame) Image.Width = TempWidth Image.Height = TempHeight End Function SX and SY for scale. Ups, didn't see the age of the thread ;) Mfg Suco |