Resize a 2D sprite ?

Just starting out? Need help? Post your questions and find answers here.
pythagoras_156
User
User
Posts: 13
Joined: Wed Aug 20, 2003 11:08 am

Resize a 2D sprite ?

Post by pythagoras_156 »

Hi,

I need to resize (in fact scale) a 2D sprite. I know there's a way to do it by using the Sprite3D functions but using 3d functions causes a big slowdown (at least on my computer) so i want to know if anyone has come up with a way that uses only 2D commands ?

thanks in advance,

pythagoras
filperj
User
User
Posts: 77
Joined: Tue Sep 16, 2003 8:53 pm
Location: Nevers(France)

Post by filperj »

I don't think it's possible with sprite commands, but you can resize an image
with ResizeImage() or resize it's drawing with the optional parameters of
DrawImage(ImageID,x,y,width,height).

For example you can load the image, create a sprite with the new dimensions
you want, then draw the resized image on the sprite...
pythagoras_156
User
User
Posts: 13
Joined: Wed Aug 20, 2003 11:08 am

Post by pythagoras_156 »

Works like a charm 8) . Thank you

pythagoras
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Yes, but the problem is that ResizeImage() is also too slow...
:(
Post Reply