December 04, 2020, 03:34:05 am


Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........

Resizing Sprites

Started by Zen, July 03, 2006, 08:06:13 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


How do i resize a sprite on the fly?

I have create a 1px x 25px image and depending on certain things i would like to make it so i resize the width, which is 1px at the start. I tried using SetStretchedSize but that doesnt seem to do anything. Any ideas?



When you create the sprite:



SetRenderMode(RENDER_TRANSSCALED); (transparent and scaled)

Then SetScaleFactor works at least :P I don't have much time right now so I can't check in more detail, but there seems to be a RENDER_BLKSTRETCHED too. Check the full list of constants in the 2d library help file. For descriptions, check the IBasic one  ;D


Ahh that was the key thing. I never set the render mode to SCALED too, i didnt think about that lol.

Thanks a lot