April 18, 2024, 09:30:39 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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.

Zen

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?

Lewis

Protected

When you create the sprite:

SetRenderMode(RENDER_SCALED);

or

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


Zen

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

Thanks a lot
Lewis