Page 1 of 1

Resize a 2D sprite ?

Posted: Wed Jan 28, 2004 5:33 pm
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

Posted: Wed Jan 28, 2004 8:40 pm
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...

Posted: Wed Jan 28, 2004 10:13 pm
by pythagoras_156
Works like a charm 8) . Thank you

pythagoras

Posted: Thu Jan 29, 2004 11:47 am
by Psychophanta
Yes, but the problem is that ResizeImage() is also too slow...
:(